Merge pull request #278 from nmav/ocserv
[project/luci.git] / applications / luci-coovachilli / luasrc / model / cbi / coovachilli_network.lua
index 2209a52..2e9768f 100644 (file)
@@ -28,14 +28,8 @@ s1:option( Value, "txqlen" ).optional = true
 
 net = s1:option( Value, "net" )
 for _, route in ipairs(luci.sys.net.routes()) do
-       if route.Iface ~= "lo" and route.Mask ~= "FFFFFFFF" then
-               local netmask = luci.ip.IPv4(route.Mask)
-               if netmask then
-                       local netaddr = luci.ip.IPv4(route.Destination, netmask)
-                       if netaddr then
-                               net:value( netaddr:string() )
-                       end
-               end
+       if route.device ~= "lo" and route.dest:prefix() < 32 then
+               net:value( route.dest:string() )
        end
 end
 
@@ -67,5 +61,7 @@ s2:option( Value, "lease" ).optional = true
 s2:option( Value, "dhcpstart" ).optional = true
 s2:option( Value, "dhcpend" ).optional = true
 
+s2:option( Flag, "eapolenable" )
+
 
 return m