diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2008-11-29 20:46:26 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2008-11-29 20:46:26 +0000 |
commit | dda65d2b94f11f69537bed3c46d3c6e80234291b (patch) | |
tree | 3073130922cdb6a34ba1be32e2c020d064a6d5ae /modules/admin-full | |
parent | 82f08a4a1d1f7d54ccc82326c02f40f11a028409 (diff) |
libs/core/ip: optmizations
libs/sys: implement defaultroute6(), change return values of routes() and routes6()
modules/admin-full: adept route config page to new api
modules/freifunk: adept overview page to new routes api
Diffstat (limited to 'modules/admin-full')
-rw-r--r-- | modules/admin-full/luasrc/model/cbi/admin_network/routes.lua | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/routes.lua b/modules/admin-full/luasrc/model/cbi/admin_network/routes.lua index a236e8c196..aa22cf63f2 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_network/routes.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_network/routes.lua @@ -21,23 +21,23 @@ if not arg or not arg[1] then net = v:option(DummyValue, "iface", translate("network")) function net.cfgvalue(self, section) - return luci.tools.webadmin.iface_get_network(routes[section].Iface) - or routes[section].Iface + return luci.tools.webadmin.iface_get_network(routes[section].device) + or routes[section].device end target = v:option(DummyValue, "target", translate("target")) function target.cfgvalue(self, section) - return luci.ip.Hex(routes[section].Destination, 32):string() + return routes[section].dest:network():string() end netmask = v:option(DummyValue, "netmask", translate("netmask")) function netmask.cfgvalue(self, section) - return luci.ip.Hex(routes[section].Mask, 32):string() + return routes[section].dest:mask():string() end gateway = v:option(DummyValue, "gateway", translate("gateway")) function gateway.cfgvalue(self, section) - return luci.ip.Hex(routes[section].Gateway, 32):string() + return routes[section].gateway:string() end metric = v:option(DummyValue, "Metric", translate("metric")) @@ -55,12 +55,12 @@ if not arg or not arg[1] then target = v:option(DummyValue, "target", translate("target")) function target.cfgvalue(self, section) - return routes6[section].dst_ip .. "/" .. routes6[section].dst_prefix + return routes6[section].dest:string() end gateway = v:option(DummyValue, "gateway", translate("gateway6")) function gateway.cfgvalue(self, section) - return routes6[section].src_ip .. "/" .. routes6[section].src_prefix + return routes6[section].source:string() end metric = v:option(DummyValue, "Metric", translate("metric")) |