X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=applications%2Fluci-radvd%2Fluasrc%2Fmodel%2Fcbi%2Fradvd%2Frdnss.lua;h=5313bbe3fabc28b41855e432e5b62128cee21885;hp=91cf25c6653edd63e1e19783a11776f04db31719;hb=a707d2cb84459d8f92eebadec86eeefb16c0548e;hpb=c2b107ed46571a1494d74d4c1af3bb22b8b2f821 diff --git a/applications/luci-radvd/luasrc/model/cbi/radvd/rdnss.lua b/applications/luci-radvd/luasrc/model/cbi/radvd/rdnss.lua index 91cf25c66..5313bbe3f 100644 --- a/applications/luci-radvd/luasrc/model/cbi/radvd/rdnss.lua +++ b/applications/luci-radvd/luasrc/model/cbi/radvd/rdnss.lua @@ -13,6 +13,7 @@ $Id$ ]]-- local sid = arg[1] +local utl = require "luci.util" m = Map("radvd", translatef("Radvd - RDNSS"), translate("Radvd is a router advertisement daemon for IPv6. " .. @@ -72,16 +73,21 @@ function o.write(self, section, value) end -o = s:option(Value, "addr", translate("Address"), +o = s:option(DynamicList, "addr", translate("Addresses"), translate("Advertised IPv6 RDNSS. If empty, the current IPv6 address of the interface is used")) -o.optional = false -o.rmempty = true -o.datatype = "ip6addr" - - -o = s:option(Flag, "AdvRDNSSOpen", translate("Open"), - translate("Indicates whether that RDNSS continues to be available to hosts even if they moved to a different subnet ")) +o.optional = false +o.rmempty = true +o.datatype = "ip6addr" +o.placeholder = translate("default") +function o.cfgvalue(self, section) + local l = { } + local v = m.uci:get_list("radvd", section, "prefix") + for v in utl.imatch(v) do + l[#l+1] = v + end + return l +end o = s:option(Value, "AdvRDNSSLifetime", translate("Lifetime"),