diff options
Diffstat (limited to 'toxcore/DHT.c')
-rw-r--r-- | toxcore/DHT.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/DHT.c b/toxcore/DHT.c index 3fd3829e..01fcfd66 100644 --- a/toxcore/DHT.c +++ b/toxcore/DHT.c | |||
@@ -1192,7 +1192,7 @@ uint32_t addto_lists(DHT *dht, IP_Port ip_port, const uint8_t *public_key) | |||
1192 | uint32_t used = 0; | 1192 | uint32_t used = 0; |
1193 | 1193 | ||
1194 | /* convert IPv4-in-IPv6 to IPv4 */ | 1194 | /* convert IPv4-in-IPv6 to IPv4 */ |
1195 | if (net_family_is_ipv6(ip_port.ip.family) && IPV6_IPV4_IN_V6(ip_port.ip.ip.v6)) { | 1195 | if (net_family_is_ipv6(ip_port.ip.family) && ipv6_ipv4_in_v6(ip_port.ip.ip.v6)) { |
1196 | ip_port.ip.family = net_family_ipv4; | 1196 | ip_port.ip.family = net_family_ipv4; |
1197 | ip_port.ip.ip.v4.uint32 = ip_port.ip.ip.v6.uint32[3]; | 1197 | ip_port.ip.ip.v4.uint32 = ip_port.ip.ip.v6.uint32[3]; |
1198 | } | 1198 | } |
@@ -1272,7 +1272,7 @@ static bool update_client_data(Client_data *array, size_t size, IP_Port ip_port, | |||
1272 | static void returnedip_ports(DHT *dht, IP_Port ip_port, const uint8_t *public_key, const uint8_t *nodepublic_key) | 1272 | static void returnedip_ports(DHT *dht, IP_Port ip_port, const uint8_t *public_key, const uint8_t *nodepublic_key) |
1273 | { | 1273 | { |
1274 | /* convert IPv4-in-IPv6 to IPv4 */ | 1274 | /* convert IPv4-in-IPv6 to IPv4 */ |
1275 | if (net_family_is_ipv6(ip_port.ip.family) && IPV6_IPV4_IN_V6(ip_port.ip.ip.v6)) { | 1275 | if (net_family_is_ipv6(ip_port.ip.family) && ipv6_ipv4_in_v6(ip_port.ip.ip.v6)) { |
1276 | ip_port.ip.family = net_family_ipv4; | 1276 | ip_port.ip.family = net_family_ipv4; |
1277 | ip_port.ip.ip.v4.uint32 = ip_port.ip.ip.v6.uint32[3]; | 1277 | ip_port.ip.ip.v4.uint32 = ip_port.ip.ip.v6.uint32[3]; |
1278 | } | 1278 | } |