From: Steven Barth Date: Thu, 1 May 2008 12:33:27 +0000 (+0000) Subject: * Fixed DHCP configuration for devices without WAN interface X-Git-Tag: 0.8.0~1081 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b2f9325073535dcdf619b45bb8fcfec3f36d645e;p=oweals%2Fluci.git * Fixed DHCP configuration for devices without WAN interface * Made interface selector for route configuration a ListValue --- 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")