diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-11-21 03:23:48 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-11-21 03:23:48 +0000 |
commit | 43a72918db4ed34126a2929f38d593f353fe04aa (patch) | |
tree | df190b18439b978f62de5eb2eacbe12865f08602 /applications/luci-radvd/luasrc | |
parent | b1b2e79afeb038225723a2ca023c77f7c67d19f2 (diff) |
applications/luci-radvd: fix removal of section in overview page
Diffstat (limited to 'applications/luci-radvd/luasrc')
-rw-r--r-- | applications/luci-radvd/luasrc/model/cbi/radvd.lua | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/applications/luci-radvd/luasrc/model/cbi/radvd.lua b/applications/luci-radvd/luasrc/model/cbi/radvd.lua index 67ef26a2f..041decce5 100644 --- a/applications/luci-radvd/luasrc/model/cbi/radvd.lua +++ b/applications/luci-radvd/luasrc/model/cbi/radvd.lua @@ -36,16 +36,18 @@ function s.create(...) end function s.remove(self, section) - local iface = m.uci:get("radvd", section, "interface") - if iface then - m.uci:delete_all("radvd", "prefix", - function(s) return s.interface == iface end) + if m.uci:get("radvd", section) == "interface" then + local iface = m.uci:get("radvd", section, "interface") + if iface then + m.uci:delete_all("radvd", "prefix", + function(s) return s.interface == iface end) - m.uci:delete_all("radvd", "route", - function(s) return s.interface == iface end) + m.uci:delete_all("radvd", "route", + function(s) return s.interface == iface end) - m.uci:delete_all("radvd", "rdnss", - function(s) return s.interface == iface end) + m.uci:delete_all("radvd", "rdnss", + function(s) return s.interface == iface end) + end end return TypedSection.remove(self, section) |