mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
direct: remove link-local ip from IFaceIPs func
This commit is contained in:
1 parent
1d5ef167ec
commit
0d1c4c5a47
2 files changed
+5
-1
No files matched your search
+3
-1
@@ -113,7 +113,9 @@ func (d *Direct) IFaceIPs() (ips []net.IP) {
|
||||
}
|
||||
|
||||
for _, ipnet := range ipnets {
|
||||
ips = append(ips, ipnet.(*net.IPNet).IP)
|
||||
if ip := ipnet.(*net.IPNet).IP; !ip.IsLinkLocalUnicast() {
|
||||
ips = append(ips, ip)
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user