]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 3670] Deleted statements come back
authorJuergen Perlinger <perlinger@ntp.org>
Tue, 9 Jun 2020 06:39:26 +0000 (08:39 +0200)
committerJuergen Perlinger <perlinger@ntp.org>
Tue, 9 Jun 2020 06:39:26 +0000 (08:39 +0200)
bk: 5edf2e9eUAdL_Kaxh4LTn3E0kBcSQA

ChangeLog
ntpd/ntp_proto.c

index a2f8bfbeac0ce2be71eb5350b9b2e02f2129b1ff..588342716f87b6c1e9555153d5c2be5cf1a3a844 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
 ---
 (4.2.8p15) 2020/04/xx Released by Harlan Stenn <stenn@ntp.or>
 
+* [Bug 3670] Deleted statements come back <perlinger@ntp.org>
+  - 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 <perlinger@ntp.org>
   - rewrite 'decodenetnum()' in terms of inet_pton
 * [Bug 3666] avoid unlimited receive buffer allocation <perlinger@ntp.org>
index 352882b970596849aa4873b5beb46c15d2320e80..cde5a30852dd4150867fa23a200d5da1a8d984e9 100644 (file)
@@ -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