Allow UDP packets with an address different from the corresponding TCP connection.

This commit is contained in:
Guus Sliepen 2009-10-24 20:54:44 +02:00
parent 5cbddc68ba
commit cddcdc9af3

View file

@ -521,12 +521,16 @@ static node_t *try_harder(const sockaddr_t *from, const vpn_packet_t *pkt) {
avl_node_t *node; avl_node_t *node;
edge_t *e; edge_t *e;
node_t *n = NULL; node_t *n = NULL;
static time_t last_hard_try = 0;
for(node = edge_weight_tree->head; node; node = node->next) { for(node = edge_weight_tree->head; node; node = node->next) {
e = node->data; e = node->data;
if(sockaddrcmp_noport(from, &e->address)) if(sockaddrcmp_noport(from, &e->address)) {
continue; if(last_hard_try == now)
continue;
last_hard_try = now;
}
if(!n) if(!n)
n = e->to; n = e->to;