luci-base: fix table compare upon writing ipaddr changes

Fixes: b33192a03 ("luci-base: support cidr list notation for option ipaddr and ip6addr")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2018-12-13 12:14:37 +01:00
parent 11b271d4a9
commit efb4d7c40a

View file

@ -34,7 +34,7 @@ usecidr.write = function(self, section)
local formvalue = (self:formvalue(section) == "1") and ipaddr_multi:formvalue(section) or ipaddr_single:formvalue(section)
local equal = (cfgvalue == formvalue)
if not equal and type(cfgvalue) == "table" and type(formvalue) == "table" then
if not equal and type(cfgvalue) == "table" and type(formvalue) == "table" and #cfgvalue == #formvalue then
equal = true
local _, v