summaryrefslogtreecommitdiffhomepage
path: root/module/admin-core
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-05-01 12:33:27 +0000
committerSteven Barth <steven@midlink.org>2008-05-01 12:33:27 +0000
commitb2f9325073535dcdf619b45bb8fcfec3f36d645e (patch)
tree7d5163789cdfa5972a9014729602240e6e54ae6c /module/admin-core
parent1c8824908223936701fe22f72d14fe75e45f3262 (diff)
* Fixed DHCP configuration for devices without WAN interface
* Made interface selector for route configuration a ListValue
Diffstat (limited to 'module/admin-core')
-rw-r--r--module/admin-core/src/model/cbi/admin_network/dhcp.lua1
-rw-r--r--module/admin-core/src/model/cbi/admin_network/routes.lua7
2 files changed, 7 insertions, 1 deletions
diff --git a/module/admin-core/src/model/cbi/admin_network/dhcp.lua b/module/admin-core/src/model/cbi/admin_network/dhcp.lua
index 766d87da2f..c8f1007ff2 100644
--- a/module/admin-core/src/model/cbi/admin_network/dhcp.lua
+++ b/module/admin-core/src/model/cbi/admin_network/dhcp.lua
@@ -13,6 +13,7 @@ iface = s:option(ListValue, "interface", "Schnittstelle")
for k, v in pairs(ffluci.model.uci.show("network").network) do
if v[".type"] == "interface" and k ~= "loopback" then
iface:value(k)
+ s:depends("interface", k) -- Only change sections with existing interfaces
end
end
diff --git a/module/admin-core/src/model/cbi/admin_network/routes.lua b/module/admin-core/src/model/cbi/admin_network/routes.lua
index fb83916781..35f5423579 100644
--- a/module/admin-core/src/model/cbi/admin_network/routes.lua
+++ b/module/admin-core/src/model/cbi/admin_network/routes.lua
@@ -7,7 +7,12 @@ s = m:section(TypedSection, "route")
s.addremove = true
s.anonymous = true
-s:option(Value, "interface", "Schnittstelle")
+iface = s:option(ListValue, "interface", "Schnittstelle")
+for k, v in pairs(ffluci.model.uci.show("network").network) do
+ if v[".type"] == "interface" and k ~= "loopback" then
+ iface:value(k)
+ end
+end
s:option(Value, "target", "Ziel", "Host-IP oder Netzwerk")