Skip to content
Snippets Groups Projects
Unverified Commit beb50b3d authored by Mohamed S. Mahmoud's avatar Mohamed S. Mahmoud Committed by GitHub
Browse files

NETOBSERV-977: some interfaces could have both ipv4 and ipv6 linklocal (#108)


We need to filter out those interfaces when we decide which
socket type to use to connect to google dns server

Signed-off-by: default avatarmsherif1234 <mmahmoud@redhat.com>
parent 2dca243a
No related branches found
No related tags found
No related merge requests found
...@@ -113,7 +113,7 @@ func findAddress(addrs []net.Addr, ipType string) (net.IP, bool) { ...@@ -113,7 +113,7 @@ func findAddress(addrs []net.Addr, ipType string) (net.IP, bool) {
} }
func getIP(pip net.IP, ipType string) (net.IP, bool) { func getIP(pip net.IP, ipType string) (net.IP, bool) {
if pip == nil || pip.IsLoopback() { if pip == nil || pip.IsLoopback() || pip.IsLinkLocalUnicast() {
return nil, false return nil, false
} }
switch ipType { switch ipType {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment