* Added DHCP page
[project/luci.git] / src / ffluci / model / cbi / admin_wifi / networks.lua
index ebc2571..20342ff 100644 (file)
@@ -8,16 +8,19 @@ s.anonymous = true
 s:option(Value, "ssid", "Netzkennung (ESSID)").maxlength = 32
 
 device = s:option(ListValue, "device", "Gerät")
-for k, v in pairs(ffluci.model.uci.show("wireless").wireless) do
-       if v[".type"] == "wifi-device" then
-               device:value(k)
+local d = ffluci.model.uci.show("wireless").wireless
+if d then
+       for k, v in pairs(d) do
+               if v[".type"] == "wifi-device" then
+                       device:value(k)
+               end
        end
 end
 
 network = s:option(ListValue, "network", "Netzwerk")
 network:value("")
 for k, v in pairs(ffluci.model.uci.show("network").network) do
-       if v[".type"] == "interface" then
+       if v[".type"] == "interface" and k ~= "loopback" then
                network:value(k)
        end
 end