wifi: add "macaddr" validator to bssid option
authorYousong Zhou <yszhou4tech@gmail.com>
Tue, 26 Feb 2019 04:36:32 +0000 (04:36 +0000)
committerYousong Zhou <yszhou4tech@gmail.com>
Tue, 26 Feb 2019 23:43:22 +0000 (07:43 +0800)
Resolves FS#1649

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
modules/luci-mod-admin-mini/luasrc/model/cbi/mini/wifi.lua
modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua

index ec929f1ed9d749007374546c70281a524e9d9c84..799211fef486091c22b61a4d8432d5c3d6bb3a55 100644 (file)
@@ -169,6 +169,7 @@ s.addremove = false
 s:option(Value, "ssid", translate("Network Name (<abbr title=\"Extended Service Set Identifier\">ESSID</abbr>)"))
 
 bssid = s:option(Value, "bssid", translate("<abbr title=\"Basic Service Set Identifier\">BSSID</abbr>"))
+bssid.datatype = "macaddr"
 
 local devs = {}
 luci.model.uci.cursor():foreach("wireless", "wifi-device",
index 1ac79d8ee7db2ba3b385c7e1e7c44c7121a0b665..16d230c3dda0a22e82cec0b66cebe784d5d9a66d 100644 (file)
@@ -396,6 +396,7 @@ ssid:depends({mode="sta-wds"})
 ssid:depends({mode="wds"})
 
 bssid = s:taboption("general", Value, "bssid", translate("<abbr title=\"Basic Service Set Identifier\">BSSID</abbr>"))
+bssid.datatype = "macaddr"
 
 network = s:taboption("general", Value, "network", translate("Network"),
        translate("Choose the network(s) you want to attach to this wireless interface or " ..