From b2f9325073535dcdf619b45bb8fcfec3f36d645e Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Thu, 1 May 2008 12:33:27 +0000 Subject: * Fixed DHCP configuration for devices without WAN interface * Made interface selector for route configuration a ListValue --- module/admin-core/src/model/cbi/admin_network/dhcp.lua | 1 + module/admin-core/src/model/cbi/admin_network/routes.lua | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) 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 766d87da2..c8f1007ff 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 fb8391678..35f542357 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") -- cgit v1.2.3