From: Guus Sliepen Date: Fri, 24 Jun 2011 20:49:18 +0000 (+0200) Subject: Don't call event_del() from the mtuevent handler, always send_mtu_probe() in ans_key_h(). X-Git-Tag: release-1.1pre1~5 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=365f60f3f8a8ff85a616d5014d555b470740d395;p=tinc Don't call event_del() from the mtuevent handler, always send_mtu_probe() in ans_key_h(). --- diff --git a/src/net_packet.c b/src/net_packet.c index 7e617a61..3627f31d 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -81,7 +81,6 @@ static void send_mtu_probe_handler(int fd, short events, void *data) { 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); n->mtuprobes = 0; - event_del(&n->mtuevent); return; } diff --git a/src/protocol_key.c b/src/protocol_key.c index 63fcd976..1e7aa033 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -275,7 +275,7 @@ bool ans_key_h(connection_t *c, char *request) { 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); return true;