mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-02-04 22:22:25 +00:00
Windows's sk_address_is_local() was returning the wrong answers for
IPv6 addresses, because I'd mistakenly cast an ai_addr to the low- level 'struct in6_addr' instead of the correct 'struct sockaddr_in6'. [originally from svn r9690]
This commit is contained in:
parent
7c8841d881
commit
251876b594
@ -645,7 +645,7 @@ int sk_address_is_local(SockAddr addr)
|
|||||||
|
|
||||||
#ifndef NO_IPV6
|
#ifndef NO_IPV6
|
||||||
if (family == AF_INET6) {
|
if (family == AF_INET6) {
|
||||||
return IN6_IS_ADDR_LOOPBACK((const struct in6_addr *)step.ai->ai_addr);
|
return IN6_IS_ADDR_LOOPBACK(&((const struct sockaddr_in6 *)step.ai->ai_addr)->sin6_addr);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
if (family == AF_INET) {
|
if (family == AF_INET) {
|
||||||
|
Loading…
Reference in New Issue
Block a user