summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoren[m] <Break@Ocean>2013-11-13 23:50:59 +0100
committerCoren[m] <Break@Ocean>2013-11-13 23:51:19 +0100
commit0f2c2fe3990cf6dea4ca100f17e4f5be2ef29ce5 (patch)
tree915c1fb7ce8dd5515dbce3a3e8187263645b0786
parent5e6fbf33b5a9865663c7004d005013d586cdf6b3 (diff)
IPv6 address of ::1 is local.
-rw-r--r--toxcore/LAN_discovery.c4
1 files changed, 4 insertions, 0 deletions
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)
191 ip4.ip4.uint32 = ip.ip6.uint32[3]; 191 ip4.ip4.uint32 = ip.ip6.uint32[3];
192 return LAN_ip(ip4); 192 return LAN_ip(ip4);
193 } 193 }
194
195 /* localhost in IPv6 (::1) */
196 if (IN6_IS_ADDR_LOOPBACK(&ip.ip6.in6_addr))
197 return 0;
194 } 198 }
195 199
196 return -1; 200 return -1;