libs/core: use is6linklocal()
This commit is contained in:
parent
cc275d166e
commit
094e2c8c81
1 changed files with 1 additions and 2 deletions
|
@ -605,11 +605,10 @@ function network.ip6addr(self)
|
||||||
local ip6 = self:_ip("ip6addr", 6)
|
local ip6 = self:_ip("ip6addr", 6)
|
||||||
if not ip6 then
|
if not ip6 then
|
||||||
local ifc = ifs[self:ifname()]
|
local ifc = ifs[self:ifname()]
|
||||||
local llr = ipc.IPv6("fe80::/10")
|
|
||||||
if ifc and ifc.ip6addrs then
|
if ifc and ifc.ip6addrs then
|
||||||
local a
|
local a
|
||||||
for _, a in ipairs(ifc.ip6addrs) do
|
for _, a in ipairs(ifc.ip6addrs) do
|
||||||
if not llr:contains(a) then
|
if not a:is6linklocal() then
|
||||||
ip6 = a:string()
|
ip6 = a:string()
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue