luci-mod-admin-full: routes: add support for route types
Allow specifying route types. Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
This commit is contained in:
parent
e06c60a0d6
commit
3d83c15fe1
1 changed files with 24 additions and 0 deletions
|
@ -41,6 +41,18 @@ mtu.placeholder = 1500
|
||||||
mtu.datatype = "range(64,9000)"
|
mtu.datatype = "range(64,9000)"
|
||||||
mtu.rmempty = true
|
mtu.rmempty = true
|
||||||
|
|
||||||
|
routetype = s:option(Value, "type", translate("Route type"))
|
||||||
|
routetype:value("", "unicast")
|
||||||
|
routetype:value("local", "local")
|
||||||
|
routetype:value("broadcast", "broadcast")
|
||||||
|
routetype:value("multicast", "multicast")
|
||||||
|
routetype:value("unreachable", "unreachable")
|
||||||
|
routetype:value("prohibit", "prohibit")
|
||||||
|
routetype:value("blackhole", "blackhole")
|
||||||
|
routetype:value("anycast", "anycast")
|
||||||
|
routetype.default = ""
|
||||||
|
routetype.rmempty = true
|
||||||
|
|
||||||
if fs.access("/proc/net/ipv6_route") then
|
if fs.access("/proc/net/ipv6_route") then
|
||||||
s = m:section(TypedSection, "route6", translate("Static IPv6 Routes"))
|
s = m:section(TypedSection, "route6", translate("Static IPv6 Routes"))
|
||||||
s.addremove = true
|
s.addremove = true
|
||||||
|
@ -68,6 +80,18 @@ if fs.access("/proc/net/ipv6_route") then
|
||||||
mtu.placeholder = 1500
|
mtu.placeholder = 1500
|
||||||
mtu.datatype = "range(64,9000)"
|
mtu.datatype = "range(64,9000)"
|
||||||
mtu.rmempty = true
|
mtu.rmempty = true
|
||||||
|
|
||||||
|
routetype = s:option(Value, "type", translate("Route type"))
|
||||||
|
routetype:value("", "unicast")
|
||||||
|
routetype:value("local", "local")
|
||||||
|
routetype:value("broadcast", "broadcast")
|
||||||
|
routetype:value("multicast", "multicast")
|
||||||
|
routetype:value("unreachable", "unreachable")
|
||||||
|
routetype:value("prohibit", "prohibit")
|
||||||
|
routetype:value("blackhole", "blackhole")
|
||||||
|
routetype:value("anycast", "anycast")
|
||||||
|
routetype.default = ""
|
||||||
|
routetype.rmempty = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue