From: Tobias Brunner Date: Wed, 27 Jun 2012 11:43:37 +0000 (+0200) Subject: Only log the sending of regular packets in sender_t X-Git-Tag: 5.0.1~210^2~118 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6d11dd5770862c68af456a464e523134bc00bbda;p=thirdparty%2Fstrongswan.git Only log the sending of regular packets in sender_t When sender_t is used to send ESP packets this would otherwise cause an extreme amount of debug messages. With this change all messages sent via sender_t.send_no_marker() cause no extra DBG1 log message, but for debugging purposes the socket plugins do log the same message again with DBG2 for all packets. --- diff --git a/src/libcharon/network/sender.c b/src/libcharon/network/sender.c index a919a02635..641dd53334 100644 --- a/src/libcharon/network/sender.c +++ b/src/libcharon/network/sender.c @@ -87,7 +87,6 @@ METHOD(sender_t, send_no_marker, void, src = packet->get_source(packet); dst = packet->get_destination(packet); - DBG1(DBG_NET, "sending packet: from %#H to %#H", src, dst); if (this->send_delay) { @@ -124,6 +123,8 @@ METHOD(sender_t, send_, void, /* if neither source nor destination port is 500 we add a Non-ESP marker */ src = packet->get_source(packet); dst = packet->get_destination(packet); + DBG1(DBG_NET, "sending packet: from %#H to %#H", src, dst); + if (dst->get_port(dst) != IKEV2_UDP_PORT && src->get_port(src) != IKEV2_UDP_PORT) {