From: Harlan Stenn Date: Tue, 21 Dec 2004 02:01:08 +0000 (-0500) Subject: If "prefer" is set, only huffpuff to the preferred peer. From Dave Mills. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9b9176fc7dee8c72e7732ffbfaa6c2b174bcde1;p=thirdparty%2Fntp.git If "prefer" is set, only huffpuff to the preferred peer. From Dave Mills. bk: 41c783e442BRHVhRZJsKPhBAo7bb7w --- diff --git a/ntpd/ntp_loopfilter.c b/ntpd/ntp_loopfilter.c index f2f78b33d2..68dde79018 100644 --- a/ntpd/ntp_loopfilter.c +++ b/ntpd/ntp_loopfilter.c @@ -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)