diff options
author | Coren[m] <Break@Ocean> | 2013-09-14 13:32:07 +0200 |
---|---|---|
committer | Coren[m] <Break@Ocean> | 2013-09-14 13:32:07 +0200 |
commit | d9965df3823bd3df30f511ae29e8cee694026d88 (patch) | |
tree | 8da248a65b6dad0f2b68ae2e85d6c302d906a729 /toxcore/LAN_discovery.c | |
parent | 09cdd813c5338fe1c809ee451d1aae35c14f05a8 (diff) |
LAN_discovery.c:
- LAN_ip(): use standard macro from IPv4-in-IPv6 test
Diffstat (limited to 'toxcore/LAN_discovery.c')
-rw-r--r-- | toxcore/LAN_discovery.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toxcore/LAN_discovery.c b/toxcore/LAN_discovery.c index c50fe65d..92e42e0f 100644 --- a/toxcore/LAN_discovery.c +++ b/toxcore/LAN_discovery.c | |||
@@ -161,7 +161,7 @@ static int LAN_ip(IP ip) | |||
161 | return 0; | 161 | return 0; |
162 | 162 | ||
163 | /* embedded IPv4-in-IPv6 */ | 163 | /* embedded IPv4-in-IPv6 */ |
164 | if (!ip.ip6.s6_addr32[0] && !ip.ip6.s6_addr32[1] && ip.ip6.s6_addr32[2] == htonl(0xFFFF)) { | 164 | if (IN6_IS_ADDR_V4MAPPED(&ip.ip6)) { |
165 | IP ip4; | 165 | IP ip4; |
166 | ip4.family = AF_INET; | 166 | ip4.family = AF_INET; |
167 | ip4.ip4.uint32 = ip.ip6.s6_addr32[3]; | 167 | ip4.ip4.uint32 = ip.ip6.s6_addr32[3]; |