From e4bbc5970f6a305d14c180792ce8736b9b7e56b8 Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Tue, 26 Feb 2019 04:36:32 +0000 Subject: [PATCH] wifi: add "macaddr" validator to bssid option Resolves FS#1649 Signed-off-by: Yousong Zhou --- modules/luci-mod-admin-mini/luasrc/model/cbi/mini/wifi.lua | 1 + modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/modules/luci-mod-admin-mini/luasrc/model/cbi/mini/wifi.lua b/modules/luci-mod-admin-mini/luasrc/model/cbi/mini/wifi.lua index ec929f1ed..799211fef 100644 --- a/modules/luci-mod-admin-mini/luasrc/model/cbi/mini/wifi.lua +++ b/modules/luci-mod-admin-mini/luasrc/model/cbi/mini/wifi.lua @@ -169,6 +169,7 @@ s.addremove = false s:option(Value, "ssid", translate("Network Name (ESSID)")) bssid = s:option(Value, "bssid", translate("BSSID")) +bssid.datatype = "macaddr" local devs = {} luci.model.uci.cursor():foreach("wireless", "wifi-device", diff --git a/modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua b/modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua index 1ac79d8ee..16d230c3d 100644 --- a/modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua +++ b/modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua @@ -396,6 +396,7 @@ ssid:depends({mode="sta-wds"}) ssid:depends({mode="wds"}) bssid = s:taboption("general", Value, "bssid", translate("BSSID")) +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 " .. -- 2.25.1