]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
If "prefer" is set, only huffpuff to the preferred peer. From Dave Mills.
authorHarlan Stenn <stenn@ntp.org>
Tue, 21 Dec 2004 02:01:08 +0000 (21:01 -0500)
committerHarlan Stenn <stenn@ntp.org>
Tue, 21 Dec 2004 02:01:08 +0000 (21:01 -0500)
bk: 41c783e442BRHVhRZJsKPhBAo7bb7w

ntpd/ntp_loopfilter.c

index f2f78b33d2081c5d56d4b028e5af24bc1af832ce..68dde790182cfa6129d3842dcc2d3b3b3158af2b 100644 (file)
@@ -290,8 +290,12 @@ local_clock(
         * is most effective if the delays are highly assymetric and
         * clockhopping is avoided and the clock frequency wander is
         * relatively small.
+        *
+        * Note either there is no prefer peer or this update is from
+        * the prefer peer.
         */
-       if (sys_huffpuff != NULL) {
+       if (sys_huffpuff != NULL && (sys_prefer == NULL || sys_prefer ==
+           peer)) {
                if (peer->delay < sys_huffpuff[sys_huffptr])
                        sys_huffpuff[sys_huffptr] = peer->delay;
                if (peer->delay < sys_mindly)