Don't enforce limits on pings for LAN ips.

This commit is contained in:
irungentoo 2015-01-14 20:56:37 -05:00
parent 5e1d6f5183
commit f07c588ef5
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98

View File

@ -1128,7 +1128,8 @@ static int handle_sendnodes_ipv6(void *object, IP_Port source, const uint8_t *pa
uint32_t i;
for (i = 0; i < num_nodes; i++) {
if (ipport_isset(&plain_nodes[i].ip_port) && ping_node_from_getnodes_ok(dht, plain_nodes[i].client_id)) {
if (ipport_isset(&plain_nodes[i].ip_port) && (LAN_ip(plain_nodes[i].ip_port.ip) == 0
|| ping_node_from_getnodes_ok(dht, plain_nodes[i].client_id))) {
send_ping_request(dht->ping, plain_nodes[i].ip_port, plain_nodes[i].client_id);
returnedip_ports(dht, plain_nodes[i].ip_port, plain_nodes[i].client_id, packet + 1);
}