Fix initialisation of packet decryption context broken by commit 3308d13e7e3bf20cfeaf...
[tinc] / src / net_packet.c
index de6ae55..0126d41 100644 (file)
@@ -54,7 +54,6 @@
 
 int keylifetime = 0;
 int keyexpires = 0;
-EVP_CIPHER_CTX packet_ctx;
 static char lzo_wrkmem[LZO1X_999_MEM_COMPRESS > LZO1X_1_MEM_COMPRESS ? LZO1X_999_MEM_COMPRESS : LZO1X_1_MEM_COMPRESS];
 
 static void send_udppacket(node_t *, vpn_packet_t *);
@@ -545,12 +544,14 @@ void handle_incoming_vpn_data(int sock)
                n = try_harder(&from, &pkt);
                if(n)
                        update_node_udp(n, &from);
-               else {
+               else ifdebug(PROTOCOL) {
                        hostname = sockaddr2hostname(&from);
                        logger(LOG_WARNING, _("Received UDP packet from unknown source %s"), hostname);
                        free(hostname);
                        return;
                }
+               else
+                       return;
        }
 
        receive_udppacket(n, &pkt);