Cygwin: getifaddrs: fix address family for IPv6 netmasks
The code in net.cc:get_ifs that sets the netmask omitted setting the address family in the IPv6 case. Fix this by setting it to AF_INET6. Partially addresses: https://cygwin.com/pipermail/cygwin/2021-July/248970.html
This commit is contained in:
parent
0542583129
commit
c08ee10d6b
|
@ -1869,6 +1869,7 @@ get_ifs (ULONG family)
|
|||
if (prefix < 32)
|
||||
if_sin6->sin6_addr.s6_addr32[cnt] <<= 32 - prefix;
|
||||
}
|
||||
if_sin6->sin6_family = AF_INET6;
|
||||
break;
|
||||
}
|
||||
ifp->ifa_ifa.ifa_netmask = (struct sockaddr *) &ifp->ifa_netmask;
|
||||
|
|
Loading…
Reference in New Issue