ntp: don't save timestamps if transmit_packet() failed
Don't save server RX and TX timestamp to clientlog if the transmission or authentication failed (e.g. packet is handled in ntp_signd). They will not be needed.
This commit is contained in:
parent
c5dde9b66a
commit
189bf9c536
1 changed files with 5 additions and 4 deletions
|
@ -2146,10 +2146,11 @@ NCR_ProcessRxUnknown(NTP_Remote_Address *remote_addr, NTP_Local_Address *local_a
|
||||||
version = info.version;
|
version = info.version;
|
||||||
|
|
||||||
/* Send a reply */
|
/* Send a reply */
|
||||||
transmit_packet(my_mode, interleaved, poll, version, kod, NULL,
|
if (!transmit_packet(my_mode, interleaved, poll, version, kod, NULL,
|
||||||
&message->receive_ts, &message->transmit_ts,
|
&message->receive_ts, &message->transmit_ts,
|
||||||
rx_ts, tx_ts, local_ntp_rx, NULL, remote_addr, local_addr,
|
rx_ts, tx_ts, local_ntp_rx, NULL, remote_addr, local_addr,
|
||||||
message, &info);
|
message, &info))
|
||||||
|
return;
|
||||||
|
|
||||||
if (local_ntp_rx)
|
if (local_ntp_rx)
|
||||||
CLG_SaveNtpTimestamps(local_ntp_rx, tx_ts ? &tx_ts->ts : NULL);
|
CLG_SaveNtpTimestamps(local_ntp_rx, tx_ts ? &tx_ts->ts : NULL);
|
||||||
|
|
Loading…
Reference in a new issue