2 LuCI - Lua Configuration Interface
4 Copyright 2008 Steven Barth <steven@midlink.org>
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
15 m = Map("network", translate("a_n_routes"), translate("a_n_routes1"))
17 local routes6 = luci.sys.net.routes6()
18 local bit = require "bit"
20 s = m:section(TypedSection, "route", translate("a_n_routes_static4"))
24 s.template = "cbi/tblsection"
26 iface1 = s:option(ListValue, "interface", translate("interface"))
28 s:option(Value, "target", translate("target"), translate("a_n_r_target1"))
29 s:option(Value, "netmask", translate("netmask"), translate("a_n_r_netmask1")).rmemepty = true
30 s:option(Value, "gateway", translate("gateway"))
33 s = m:section(TypedSection, "route6", translate("a_n_routes_static6"))
37 s.template = "cbi/tblsection"
39 iface2 = s:option(ListValue, "interface", translate("interface"))
41 s:option(Value, "target", translate("target"), translate("a_n_r_target6"))
42 s:option(Value, "gateway", translate("gateway6")).rmempty = true
45 m.uci:foreach("network", "interface", function(s)
46 if s[".name"] ~= "loopback" then
47 iface:value(s[".name"])
49 iface2:value(s[".name"])