diff options
author | Daniel Dickinson <cshoredaniel@users.noreply.github.com> | 2016-12-10 11:00:16 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-10 11:00:16 -0500 |
commit | 8c6c75f6ec5459aaa48e2985389e1954e795ffb4 (patch) | |
tree | 944db9818e3be4da6298628e3a0a3d8636b510ba /modules | |
parent | 0fdee1ed9db38c2e324e83470765063b79d66013 (diff) | |
parent | 44d43c6932c502b27a1a172047d591f32555f96c (diff) |
Merge pull request #821 from andrewshadura/luci-route-types
Add support for route types
Diffstat (limited to 'modules')
-rw-r--r-- | modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/routes.lua | 28 |
1 files changed, 28 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..1970f36a2 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 @@ -34,13 +34,27 @@ g.rmempty = true metric = s:option(Value, "metric", translate("Metric")) metric.placeholder = 0 metric.datatype = "range(0,255)" +metric.size = 5 metric.rmempty = true mtu = s:option(Value, "mtu", translate("MTU")) mtu.placeholder = 1500 mtu.datatype = "range(64,9000)" +mtu.size = 5 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 @@ -62,12 +76,26 @@ if fs.access("/proc/net/ipv6_route") then metric = s:option(Value, "metric", translate("Metric")) metric.placeholder = 0 metric.datatype = "range(0,65535)" -- XXX: not sure + metric.size = 5 metric.rmempty = true mtu = s:option(Value, "mtu", translate("MTU")) mtu.placeholder = 1500 mtu.datatype = "range(64,9000)" + mtu.size = 5 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 |