Don't call event_del() from the mtuevent handler, always send_mtu_probe() in ans_key_h().

This commit is contained in:
Guus Sliepen 2011-06-24 22:49:18 +02:00
parent 1fe8ba2f06
commit 365f60f3f8
2 changed files with 1 additions and 2 deletions

View file

@ -81,7 +81,6 @@ static void send_mtu_probe_handler(int fd, short events, void *data) {
if(!n->status.reachable || !n->status.validkey) { if(!n->status.reachable || !n->status.validkey) {
ifdebug(TRAFFIC) logger(LOG_INFO, "Trying to send MTU probe to unreachable or rekeying node %s (%s)", n->name, n->hostname); ifdebug(TRAFFIC) logger(LOG_INFO, "Trying to send MTU probe to unreachable or rekeying node %s (%s)", n->name, n->hostname);
n->mtuprobes = 0; n->mtuprobes = 0;
event_del(&n->mtuevent);
return; return;
} }

View file

@ -275,7 +275,7 @@ bool ans_key_h(connection_t *c, char *request) {
update_node_udp(from, &sa); update_node_udp(from, &sa);
} }
if(from->options & OPTION_PMTU_DISCOVERY && !event_initialized(&from->mtuevent)) if(from->options & OPTION_PMTU_DISCOVERY)
send_mtu_probe(from); send_mtu_probe(from);
return true; return true;