]> git.meshlink.io Git - meshlink/commitdiff
Only log success of initial datagram SPTPS handshake.
authorGuus Sliepen <guus@tinc-vpn.org>
Sun, 14 Oct 2012 12:45:27 +0000 (14:45 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Sun, 14 Oct 2012 12:45:27 +0000 (14:45 +0200)
src/net_packet.c

index c61bc60a898e9d55f613c860af0f0a63b9e79df0..67ebc223624931baecd4f7fa44761ce1105839f5 100644 (file)
@@ -674,9 +674,11 @@ bool receive_sptps_record(void *handle, uint8_t type, const char *data, uint16_t
        node_t *from = handle;
 
        if(type == SPTPS_HANDSHAKE) {
-               from->status.validkey = true;
-               from->status.waitingforkey = false;
-               logger(DEBUG_META, LOG_INFO, "SPTPS key exchange with %s (%s) succesful", from->name, from->hostname);
+               if(!from->status.validkey) {
+                       from->status.validkey = true;
+                       from->status.waitingforkey = false;
+                       logger(DEBUG_META, LOG_INFO, "SPTPS key exchange with %s (%s) succesful", from->name, from->hostname);
+               }
                return true;
        }