From: Guus Sliepen Date: Sat, 24 Oct 2009 18:54:44 +0000 (+0200) Subject: Allow UDP packets with an address different from the corresponding TCP connection. X-Git-Tag: release-1.0.11~10 X-Git-Url: https://tinc-vpn.org/git/browse?a=commitdiff_plain;h=cddcdc9af34afb388a8e4bdfff6882f568b98313;p=tinc Allow UDP packets with an address different from the corresponding TCP connection. --- diff --git a/src/net_packet.c b/src/net_packet.c index 9b0e4685..7bf12497 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -521,12 +521,16 @@ static node_t *try_harder(const sockaddr_t *from, const vpn_packet_t *pkt) { avl_node_t *node; edge_t *e; node_t *n = NULL; + static time_t last_hard_try = 0; for(node = edge_weight_tree->head; node; node = node->next) { e = node->data; - if(sockaddrcmp_noport(from, &e->address)) - continue; + if(sockaddrcmp_noport(from, &e->address)) { + if(last_hard_try == now) + continue; + last_hard_try = now; + } if(!n) n = e->to;