mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Merge pull request #648 from FullName/LAN_ip-ip6-loopback-is-local
IPv6 address of ::1 is local.
This commit is contained in:
commit
3af83a6aec
|
@ -191,6 +191,10 @@ int LAN_ip(IP ip)
|
|||
ip4.ip4.uint32 = ip.ip6.uint32[3];
|
||||
return LAN_ip(ip4);
|
||||
}
|
||||
|
||||
/* localhost in IPv6 (::1) */
|
||||
if (IN6_IS_ADDR_LOOPBACK(&ip.ip6.in6_addr))
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue
Block a user