diff options
Diffstat (limited to 'modules/admin-full/luasrc/model')
-rw-r--r-- | modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua b/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua index 014de7ddf7..bea425d723 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_network/ifaces.lua @@ -14,8 +14,14 @@ $Id$ m = Map("network", translate("interfaces"), translate("a_n_ifaces1")) s = m:section(TypedSection, "interface", "") -s.addremove = true -s:exclude("loopback") +function s.filter(section) + return section ~= "loopback" and (not arg or #arg == 0 or + luci.util.contains(arg, section)) +end + +if not arg or #arg == 0 then + s.addremove = true +end s:depends("proto", "static") s:depends("proto", "dhcp") |