mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 00:15:07 -05:00
ntp: count packets with invalid format
Include packets that cannot be parsed in the total RX count.
This commit is contained in:
@@ -1602,8 +1602,6 @@ process_response(NCR_Instance inst, NTP_Local_Address *local_addr,
|
||||
|
||||
stats = SRC_GetSourcestats(inst->source);
|
||||
|
||||
inst->report.total_rx_count++;
|
||||
|
||||
pkt_leap = NTP_LVM_TO_LEAP(message->lvm);
|
||||
pkt_version = NTP_LVM_TO_VERSION(message->lvm);
|
||||
pkt_refid = ntohl(message->reference_id);
|
||||
@@ -2023,6 +2021,8 @@ NCR_ProcessRxKnown(NCR_Instance inst, NTP_Local_Address *local_addr,
|
||||
int proc_packet, proc_as_unknown;
|
||||
NTP_PacketInfo info;
|
||||
|
||||
inst->report.total_rx_count++;
|
||||
|
||||
if (!parse_packet(message, length, &info))
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user