* applications/luci-fw: Added support for customizing inter-device routing
[project/luci.git] / applications / luci-fw / src / model / cbi / admin_network / firewall.lua
index 4ff15db..7c89d07 100644 (file)
@@ -13,8 +13,18 @@ chain:value("output", "Output")
 chain:value("prerouting", "Prerouting")
 chain:value("postrouting", "Postrouting")
 
-s:option(Value, "iface", "Eingangsschnittstelle").optional = true
-s:option(Value, "oface", "Ausgangsschnittstelle").optional = true
+iface = s:option(ListValue, "iface", "Eingangsschnittstelle")
+iface.optional = true
+
+oface = s:option(ListValue, "oface", "Ausgangsschnittstelle")
+oface.optional = true
+
+for k, v in pairs(ffluci.model.uci.sections("network")) do
+       if v[".type"] == "interface" and k ~= "loopback" then
+               iface:value(k)
+               oface:value(k)
+       end
+end
 
 proto = s:option(ListValue, "proto", "Protokoll")
 proto.optional = true