summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-radvd/luasrc/model/cbi/radvd/route.lua
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-radvd/luasrc/model/cbi/radvd/route.lua')
-rw-r--r--applications/luci-radvd/luasrc/model/cbi/radvd/route.lua21
1 files changed, 2 insertions, 19 deletions
diff --git a/applications/luci-radvd/luasrc/model/cbi/radvd/route.lua b/applications/luci-radvd/luasrc/model/cbi/radvd/route.lua
index 37fac576b4..97c72a4ec3 100644
--- a/applications/luci-radvd/luasrc/model/cbi/radvd/route.lua
+++ b/applications/luci-radvd/luasrc/model/cbi/radvd/route.lua
@@ -90,28 +90,11 @@ end
o = s:option(Value, "AdvRouteLifetime", translate("Lifetime"),
- translate("Specifies the lifetime associated with the route in seconds. Use 0 to specify an infinite lifetime"))
+ translate("Specifies the lifetime associated with the route in seconds."))
-o.datatype = "uinteger"
+o.datatype = 'or(uinteger,"infinity")'
o.placeholder = 1800
-function o.cfgvalue(self, section)
- local v = Value.cfgvalue(self, section)
- if v == "infinity" then
- return 0
- else
- return v
- end
-end
-
-function o.write(self, section, value)
- if value == "0" then
- Value.write(self, section, "infinity")
- else
- Value.write(self, section, value)
- end
-end
-
o = s:option(ListValue, "AdvRoutePreference", translate("Preference"),
translate("Specifies the preference associated with the default router"))