From: Guus Sliepen Date: Wed, 10 Aug 2011 15:04:17 +0000 (+0200) Subject: Handle UDP packets with unknown source addresses properly. X-Git-Tag: release-1.1pre3~164 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=5d4336e5429b88dcc53e80c00412e76a5269b384;p=tinc Handle UDP packets with unknown source addresses properly. Probably due to a merge, the try_harder() function had duplicated the rate-limiting code for detecting the sender node based on the HMAC of the packet. This prevented this detection from running at all. The function is now identical again to that in the 1.0 branch. --- diff --git a/src/net_packet.c b/src/net_packet.c index 3627f31d..875a0832 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -570,11 +570,6 @@ static node_t *try_harder(const sockaddr_t *from, const vpn_packet_t *pkt) { static time_t last_hard_try = 0; time_t now = time(NULL); - if(last_hard_try == now) - return NULL; - else - last_hard_try = now; - for(node = edge_weight_tree->head; node; node = node->next) { e = node->data;