diff options
Diffstat (limited to 'toxcore/network.c')
-rw-r--r-- | toxcore/network.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/network.c b/toxcore/network.c index fe2ef238..4b6dc3be 100644 --- a/toxcore/network.c +++ b/toxcore/network.c | |||
@@ -518,10 +518,10 @@ int ip_equal(IP *a, IP *b) | |||
518 | 518 | ||
519 | /* different family: check on the IPv6 one if it is the IPv4 one embedded */ | 519 | /* different family: check on the IPv6 one if it is the IPv4 one embedded */ |
520 | if ((a->family == AF_INET) && (b->family == AF_INET6)) { | 520 | if ((a->family == AF_INET) && (b->family == AF_INET6)) { |
521 | if (IN6_IS_ADDR_V4COMPAT(&b->ip6.in6_addr)) | 521 | if (IN6_IS_ADDR_V4MAPPED(&b->ip6.in6_addr)) |
522 | return (a->ip4.in_addr.s_addr == b->ip6.uint32[3]); | 522 | return (a->ip4.in_addr.s_addr == b->ip6.uint32[3]); |
523 | } else if ((a->family == AF_INET6) && (b->family == AF_INET)) { | 523 | } else if ((a->family == AF_INET6) && (b->family == AF_INET)) { |
524 | if (IN6_IS_ADDR_V4COMPAT(&a->ip6.in6_addr)) | 524 | if (IN6_IS_ADDR_V4MAPPED(&a->ip6.in6_addr)) |
525 | return (a->ip6.uint32[3] == b->ip4.in_addr.s_addr); | 525 | return (a->ip6.uint32[3] == b->ip4.in_addr.s_addr); |
526 | } | 526 | } |
527 | 527 | ||