From: Juergen Perlinger Date: Tue, 9 Jun 2020 06:39:26 +0000 (+0200) Subject: [Bug 3670] Deleted statements come back X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcc1bffca35d91b6ad45b9b85a92d3543047318c;p=thirdparty%2Fntp.git [Bug 3670] Deleted statements come back bk: 5edf2e9eUAdL_Kaxh4LTn3E0kBcSQA --- diff --git a/ChangeLog b/ChangeLog index a2f8bfbea..588342716 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ --- (4.2.8p15) 2020/04/xx Released by Harlan Stenn +* [Bug 3670] Deleted statements come back + - fixed a bad merge that happened before 4.2.8-p14. Thanks to + Sylar Tao for noticing this! * [Bug 3667] decodenetnum fails with numeric port - rewrite 'decodenetnum()' in terms of inet_pton * [Bug 3666] avoid unlimited receive buffer allocation diff --git a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c index 352882b97..cde5a3085 100644 --- a/ntpd/ntp_proto.c +++ b/ntpd/ntp_proto.c @@ -2487,10 +2487,6 @@ process_packet( double etemp, ftemp, td; #endif /* ASSYM */ -#if 0 - sys_processed++; - peer->processed++; -#endif p_del = FPTOD(NTOHS_FP(pkt->rootdelay)); p_offset = 0; p_disp = FPTOD(NTOHS_FP(pkt->rootdisp)); @@ -2503,10 +2499,6 @@ process_packet( pversion = PKT_VERSION(pkt->li_vn_mode); pstratum = PKT_TO_STRATUM(pkt->stratum); - /**/ - - /**/ - /* * Verify the server is synchronized; that is, the leap bits, * stratum and root distance are valid. @@ -2526,19 +2518,15 @@ process_packet( peer->seldisptoolarge++; DPRINTF(1, ("packet: flash header %04x\n", peer->flash)); - - /* ppoll updated? */ - /* XXX: Fuzz the poll? */ - poll_update(peer, peer->hpoll, (peer->hmode == MODE_CLIENT)); + /* [Bug 3592] do *not* update poll on bad packets! */ return; } - /**/ - -#if 1 + /* + * update stats, now that we really handle this packet: + */ sys_processed++; peer->processed++; -#endif /* * Capture the header values in the client/peer association.. @@ -2573,9 +2561,6 @@ process_packet( if (peer->burst > 0) peer->nextdate = current_time; } - poll_update(peer, peer->hpoll, (peer->hmode == MODE_CLIENT)); - - /**/ /* * If the peer was previously unreachable, raise a trap. In any