From cddcdc9af34afb388a8e4bdfff6882f568b98313 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sat, 24 Oct 2009 20:54:44 +0200 Subject: [PATCH 1/1] Allow UDP packets with an address different from the corresponding TCP connection. --- src/net_packet.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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; -- 2.20.1