X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=applications%2Fluci-fw%2Fluasrc%2Fmodel%2Fcbi%2Fluci_fw%2Frouting.lua;h=615e7c87465085dba0016d7b46dfe63bae3d08d3;hp=364e69f62391f4bc5d491c6e8d92a86296b76b3e;hb=dd9606825da5d73883b8313f5af905ea1b2a4d7d;hpb=75f3dbaa6136a1288fbe92d80fc127f5228f5d64 diff --git a/applications/luci-fw/luasrc/model/cbi/luci_fw/routing.lua b/applications/luci-fw/luasrc/model/cbi/luci_fw/routing.lua index 364e69f62..615e7c874 100644 --- a/applications/luci-fw/luasrc/model/cbi/luci_fw/routing.lua +++ b/applications/luci-fw/luasrc/model/cbi/luci_fw/routing.lua @@ -14,12 +14,13 @@ s.anonymous = true iface = s:option(ListValue, "iface", "Eingang", "Eingangsschnittstelle") oface = s:option(ListValue, "oface", "Ausgang", "Ausgangsschnittstelle") -for k, v in pairs(luci.model.uci.sections("network")) do - if v[".type"] == "interface" and k ~= "loopback" then - iface:value(k) - oface:value(k) - end -end +luci.model.uci.foreach("network", "interface", + function (section) + if section[".name"] ~= "loopback" then + iface:value(section[".name"]) + oface:value(section[".name"]) + end + end) s:option(Flag, "fwd", "FWD", "weiterleiten").rmempty = true s:option(Flag, "nat", "NAT", "übersetzen").rmempty = true