From: Guus Sliepen Date: Sun, 26 Feb 2012 15:56:53 +0000 (+0100) Subject: Don't close control connections when handling a reload command. X-Git-Tag: import-tinc-1.1~394 X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=a1bd3a291379492c8ffecd53792065dc20a28c79;p=meshlink Don't close control connections when handling a reload command. Because this would terminate the connection while the control message handler was still running, it would lead to a segmentation fault later on. --- diff --git a/src/net.c b/src/net.c index 336bf9ee..c743d598 100644 --- a/src/net.c +++ b/src/net.c @@ -165,6 +165,9 @@ static void timeout_handler(int fd, short events, void *event) { next = node->next; c = node->data; + if(c->status.control) + continue; + if(c->last_ping_time + pingtimeout <= now) { if(c->status.active) { if(c->status.pinged) { @@ -276,6 +279,9 @@ int reload_configuration(void) { for(node = connection_tree->head; node; node = next) { c = node->data; next = node->next; + + if(c->status.control) + continue; if(c->outgoing) { free(c->outgoing->name);