]> git.meshlink.io Git - meshlink/commitdiff
Only log errors sending UDP packets when debug level >= 5.
authorGuus Sliepen <guus@tinc-vpn.org>
Fri, 2 Mar 2012 15:09:58 +0000 (16:09 +0100)
committerGuus Sliepen <guus@tinc-vpn.org>
Fri, 2 Mar 2012 15:09:58 +0000 (16:09 +0100)
Since tinc will fall back to TCP or route via another node, it is not necessary
to log such errors unconditionally.

src/net_packet.c

index 4b3496d38ea3572155c5c52c976aa15fb7b64205..e3a57b1737d66e16d2849b6f9daa169e179953e9 100644 (file)
@@ -537,7 +537,7 @@ static void send_udppacket(node_t *n, vpn_packet_t *origpkt) {
                        if(n->mtu >= origlen)
                                n->mtu = origlen - 1;
                } else
-                       logger(LOG_ERR, "Error sending packet to %s (%s): %s", n->name, n->hostname, sockstrerror(sockerrno));
+                       ifdebug(TRAFFIC) logger(LOG_WARNING, "Error sending packet to %s (%s): %s", n->name, n->hostname, sockstrerror(sockerrno));
        }
 
 end: