Skip to content
Snippets Groups Projects
Unverified Commit 6afde08c 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 (#109)


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>
(cherry picked from commit 9a3f45e9bf299914462aacb49abc88682f168030)
parent c62173ac
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) {
}
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
}
switch ipType {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment