From cc275d166e8bc4c343aa6e3656c91019f7ec9ab7 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 12 Feb 2011 19:09:36 +0000 Subject: applications/luci-radvd: use is6linklocal() --- applications/luci-radvd/luasrc/model/cbi/radvd.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'applications/luci-radvd/luasrc') diff --git a/applications/luci-radvd/luasrc/model/cbi/radvd.lua b/applications/luci-radvd/luasrc/model/cbi/radvd.lua index b59b4e69b..10d087084 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 -- cgit v1.2.3