From: Guus Sliepen Date: Fri, 4 Jun 2010 14:03:19 +0000 (+0200) Subject: Do not append an address to ANS_KEY messages if we don't know any address. X-Git-Tag: release-1.0.14~47 X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=commitdiff_plain;h=4b6a9f1c1f645ce5989692655337d9e23ca28648;hp=798fa2f04c52b0639713f74b1195847bec40c16a Do not append an address to ANS_KEY messages if we don't know any address. This would let tinc raise an exception when an ANS_KEY request crossed a DEL_EDGE request for the node sending the key. --- diff --git a/src/protocol_key.c b/src/protocol_key.c index 67f40af4..22692bb6 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -229,7 +229,7 @@ bool ans_key_h(connection_t *c) { return true; } - if(!*address) { + if(!*address && from->address.sa.sa_family != AF_UNSPEC) { char *address, *port; ifdebug(PROTOCOL) logger(LOG_DEBUG, "Appending reflexive UDP address to ANS_KEY from %s to %s", from->name, to->name); sockaddr2str(&from->address, &address, &port);