diff options
author | Andrew Shadura <andrew.shadura@collabora.co.uk> | 2016-10-08 18:29:08 +0200 |
---|---|---|
committer | Andrew Shadura <andrew.shadura@collabora.co.uk> | 2016-10-08 18:41:31 +0200 |
commit | 3d83c15fe166595e00e54ade6beec30aab4d2664 (patch) | |
tree | a95c3e80e1168bb75a8743aff650a79d2e59ac8a | |
parent | e06c60a0d669bed72e495d51f5e30513b05f5605 (diff) |
luci-mod-admin-full: routes: add support for route types
Allow specifying route types.
Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk>
-rw-r--r-- | modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/routes.lua | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/routes.lua b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/routes.lua index ac02b156e..e5f308e6d 100644 --- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/routes.lua +++ b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/routes.lua @@ -41,6 +41,18 @@ mtu.placeholder = 1500 mtu.datatype = "range(64,9000)" 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 s = m:section(TypedSection, "route6", translate("Static IPv6 Routes")) s.addremove = true @@ -68,6 +80,18 @@ if fs.access("/proc/net/ipv6_route") then mtu.placeholder = 1500 mtu.datatype = "range(64,9000)" 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 |