applications/luci-radvd: sync with OpenWrt trunk changes
[project/luci.git] / applications / luci-radvd / luasrc / model / cbi / radvd / interface.lua
index ae8e062..519664c 100644 (file)
@@ -13,6 +13,7 @@ $Id$
 ]]--
 
 local sid = arg[1]
+local utl = require "luci.util"
 
 m = Map("radvd", translatef("Radvd - Interface %q", "?"),
        translate("Radvd is a router advertisement daemon for IPv6. " ..
@@ -84,6 +85,22 @@ function o.write(self, section, value)
 end
 
 
+o = s:taboption("general", DynamicList, "client", translate("Clients"),
+       translate("Restrict communication to specified clients, leave empty to use multicast"))
+
+o.rmempty     = true
+o.datatype    = "ip6addr"
+o.placeholder = "any"
+function o.cfgvalue(...)
+       local v = Value.cfgvalue(...)
+       local l = { }
+       for v in utl.imatch(v) do
+               l[#l+1] = v
+       end
+       return l
+end
+
+
 o = s:taboption("general", Flag, "AdvSendAdvert", translate("Enable advertisements"),
        translate("Enables router advertisements and solicitations"))