X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fprotocol_misc.c;h=d808d73fa6b6c5473adce1dd485db3a48c096efb;hb=72136f8418bc7e8a0a5bf3c11215aa49dc679659;hp=d4a45e8ce820580b553da752ac4fd522970405fa;hpb=ca989c0c8b19901cbd7664a9d2b42aa85c9c176e;p=tinc diff --git a/src/protocol_misc.c b/src/protocol_misc.c index d4a45e8c..d808d73f 100644 --- a/src/protocol_misc.c +++ b/src/protocol_misc.c @@ -20,6 +20,7 @@ #include "system.h" +#include "address_cache.h" #include "conf.h" #include "connection.h" #include "logger.h" @@ -68,14 +69,7 @@ bool pong_h(connection_t *c, const char *request) { if(c->outgoing) { c->outgoing->timeout = 0; - c->outgoing->cfg = NULL; - - if(c->outgoing->ai) { - freeaddrinfo(c->outgoing->ai); - } - - c->outgoing->ai = NULL; - c->outgoing->aip = NULL; + reset_address_cache(c->outgoing->address_cache, &c->address); } return true;