diff --git a/toxcore/LAN_discovery.c b/toxcore/LAN_discovery.c index eb0b95a1..24581845 100644 --- a/toxcore/LAN_discovery.c +++ b/toxcore/LAN_discovery.c @@ -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;