Only add a reflexive address when we're sure it's working.
authorGuus Sliepen <guus@tinc-vpn.org>
Thu, 14 Jan 2016 14:07:22 +0000 (15:07 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Thu, 14 Jan 2016 14:39:38 +0000 (15:39 +0100)
src/protocol_key.c

index dd547047f0a58b2c699c8625d1495a840fb9409e..d24d4aca01af43c968bdc156fd23df4b729448a2 100644 (file)
@@ -400,7 +400,7 @@ bool ans_key_h(connection_t *c, const char *request) {
                        return true;
                }
 
-               if(!*address && from->address.sa.sa_family != AF_UNSPEC) {
+               if(!*address && from->address.sa.sa_family != AF_UNSPEC && to->minmtu) {
                        char *address, *port;
                        logger(DEBUG_PROTOCOL, LOG_DEBUG, "Appending reflexive UDP address to ANS_KEY from %s to %s", from->name, to->name);
                        sockaddr2str(&from->address, &address, &port);