]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
ntp: add debug message for received packet
authorMiroslav Lichvar <mlichvar@redhat.com>
Fri, 15 Aug 2014 14:17:50 +0000 (16:17 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Fri, 15 Aug 2014 14:51:10 +0000 (16:51 +0200)
ntp_io.c

index a57be3b1ff5052d9298f422cde16db317adfa4ed..ef97a0eb02bc419ca95a2e1905f31d6e69de8ad3 100644 (file)
--- 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,