From: Michael Tokarev Date: Thu, 21 May 2009 21:10:16 +0000 (+0400) Subject: don't log every strange packet coming to the UDP port X-Git-Tag: release-1.0.10~67 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=0246939ce18e1af9660b782b6814be182a7af9da;p=tinc don't log every strange packet coming to the UDP port it's a sure way to fill up syslog. Only log those if debug level is up to PROTOCOL --- diff --git a/src/net_packet.c b/src/net_packet.c index de6ae550..a5fede14 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -545,12 +545,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);