From: Miroslav Lichvar Date: Fri, 15 Aug 2014 14:17:50 +0000 (+0200) Subject: ntp: add debug message for received packet X-Git-Tag: 1.31-pre1~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9ce25bab048511653cc4c890d22aa86cab3d1286;p=thirdparty%2Fchrony.git ntp: add debug message for received packet --- diff --git a/ntp_io.c b/ntp_io.c index a57be3b1..ef97a0eb 100644 --- a/ntp_io.c +++ b/ntp_io.c @@ -537,6 +537,13 @@ read_from_socket(void *anything) #endif } + if (status > 0) { + DEBUG_LOG(LOGF_NtpIO, "Received %d bytes from %s:%d to %s fd %d", + status, + UTI_IPToString(&remote_addr.ip_addr), remote_addr.port, + UTI_IPToString(&local_addr.ip_addr), local_addr.sock_fd); + } + if (status >= NTP_NORMAL_PACKET_SIZE && status <= sizeof(NTP_Packet)) { NSR_ProcessReceive((NTP_Packet *) &message.ntp_pkt, &now, now_err,