Merge pull request #648 from FullName/LAN_ip-ip6-loopback-is-local

IPv6 address of ::1 is local.
This commit is contained in:
irungentoo 2013-11-13 16:03:13 -08:00
commit 3af83a6aec

View File

@ -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;