luci-mod-admin-full: canonicalize configured static lease MAC
When reading the configured mac address of the static lease, filter it through luci.ip.checkmac() to canonicalize and uppercase the value for mapping it against the combo box host hints. Fixes #1772. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
8335997df5
commit
9adbd79faa
1 changed files with 5 additions and 0 deletions
|
@ -297,6 +297,11 @@ mac = s:option(Value, "mac", translate("<abbr title=\"Media Access Control\">MAC
|
|||
mac.datatype = "list(macaddr)"
|
||||
mac.rmempty = true
|
||||
|
||||
function mac.cfgvalue(self, section)
|
||||
local val = Value.cfgvalue(self, section)
|
||||
return ipc.checkmac(val) or val
|
||||
end
|
||||
|
||||
ip = s:option(Value, "ip", translate("<abbr title=\"Internet Protocol Version 4\">IPv4</abbr>-Address"))
|
||||
ip.datatype = "or(ip4addr,'ignore')"
|
||||
|
||||
|
|
Loading…
Reference in a new issue