modules/admin-full: Rewrote route configuration page
[project/luci.git] / modules / admin-core / luasrc / tools / webadmin.lua
index d6d9521..57941c9 100644 (file)
@@ -116,4 +116,22 @@ function firewall_find_zone(name)
        )
        
        return find
        )
        
        return find
+end
+
+function iface_get_network(iface)
+       local net
+       
+       luci.model.uci.foreach("network", "interface",
+               function (section)
+                       local ifname = luci.model.uci.get_statevalue(
+                               "network", section[".name"], "ifname"
+                       )
+                       
+                       if iface == ifname then
+                               net = section[".name"]
+                       end
+               end
+       )
+       
+       return net
 end
\ No newline at end of file
 end
\ No newline at end of file