diff options
author | Steven Barth <steven@midlink.org> | 2008-08-14 20:33:30 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-08-14 20:33:30 +0000 |
commit | 68d499edb91de2d73f14d5dcc4d6328fff2e23ea (patch) | |
tree | 771e508072c738b8d4e21fcd5de28227a2e6b9ed /modules/admin-core/luasrc/tools/webadmin.lua | |
parent | 7726e737252026683d10f5d85a32798f975ef437 (diff) |
modules/admin-full: Rewrote route configuration page
Diffstat (limited to 'modules/admin-core/luasrc/tools/webadmin.lua')
-rw-r--r-- | modules/admin-core/luasrc/tools/webadmin.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/admin-core/luasrc/tools/webadmin.lua b/modules/admin-core/luasrc/tools/webadmin.lua index d6d952117..57941c966 100644 --- a/modules/admin-core/luasrc/tools/webadmin.lua +++ b/modules/admin-core/luasrc/tools/webadmin.lua @@ -116,4 +116,22 @@ function firewall_find_zone(name) ) 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 |