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: http://git.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=b2f9325073535dcdf619b45bb8fcfec3f36d645e * 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 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")