summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-radvd/luasrc
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-radvd/luasrc')
-rw-r--r--applications/luci-radvd/luasrc/model/cbi/radvd.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/applications/luci-radvd/luasrc/model/cbi/radvd.lua b/applications/luci-radvd/luasrc/model/cbi/radvd.lua
index b59b4e69b2..10d0870840 100644
--- a/applications/luci-radvd/luasrc/model/cbi/radvd.lua
+++ b/applications/luci-radvd/luasrc/model/cbi/radvd.lua
@@ -144,9 +144,8 @@ function o.cfgvalue(self, section)
local ifc = nm:get_interface(net:ifname())
if ifc then
local adr
- local lla = luci.ip.IPv6("fe80::/10")
for _, adr in ipairs(ifc:ip6addrs()) do
- if not lla:contains(adr) then
+ if not adr:is6linklocal() then
v = adr:string()
break
end
@@ -295,9 +294,8 @@ function o.cfgvalue(self, section)
local ifc = nm:get_interface(net:ifname())
if ifc then
local adr
- local lla = luci.ip.IPv6("fe80::/10")
for _, adr in ipairs(ifc:ip6addrs()) do
- if not lla:contains(adr) then
+ if not adr:is6linklocal() then
v = adr:network(128):string()
break
end