From 0eeb16d03118b25a9605d9626ee2b578116fb9b7 Mon Sep 17 00:00:00 2001 From: iphydf Date: Thu, 8 Feb 2018 15:18:54 +0000 Subject: Reject discovery packets coming from outside the LAN. Even if that means rejecting packets from ourselves if our IP is not a "LAN" IP. --- toxcore/LAN_discovery.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'toxcore/LAN_discovery.c') diff --git a/toxcore/LAN_discovery.c b/toxcore/LAN_discovery.c index cb10b0aa..2f43ea11 100644 --- a/toxcore/LAN_discovery.c +++ b/toxcore/LAN_discovery.c @@ -351,16 +351,10 @@ static int handle_LANdiscovery(void *object, IP_Port source, const uint8_t *pack char ip_str[IP_NTOA_LEN] = { 0 }; ip_ntoa(&source.ip, ip_str, sizeof(ip_str)); - // TODO(iphydf): Add logging for this case. - // Why should we reject discovery packets from outside the LAN? -#if 0 - if (ip_is_lan(source.ip) == -1) { return 1; } -#endif - if (length != CRYPTO_PUBLIC_KEY_SIZE + 1) { return 1; } -- cgit v1.2.3