From: Dave Hart Date: Tue, 29 Nov 2011 13:33:26 +0000 (+0000) Subject: Never send KoD rate limiting response to MODE_SERVER response. X-Git-Tag: NTP_4_2_6P5_RC2~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=584f74ff778d785b04ac5541c162e68c1e475d53;p=thirdparty%2Fntp.git Never send KoD rate limiting response to MODE_SERVER response. bk: 4ed4df26bo_5lzR0bTJ3O-7Pds94Yg --- diff --git a/ChangeLog b/ChangeLog index 338873b29..442c31487 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,7 +6,9 @@ * [Bug 2069] broadcastclient, multicastclient spin up duplicate ephemeral associations without broadcastdelay. * Exclude not-yet-determined sys_refid from use in loopback TEST12 - (from David Mills). + (from David Mills). +* Never send KoD rate limiting response to MODE_SERVER response. + --- (4.2.6p5-RC1) 2011/10/18 Released by Harlan Stenn diff --git a/ntpd/ntp_crypto.c b/ntpd/ntp_crypto.c index 609e8528c..38f38a1d3 100644 --- a/ntpd/ntp_crypto.c +++ b/ntpd/ntp_crypto.c @@ -855,7 +855,7 @@ crypto_recv( * protocol. A protocol restart will occur at * the next ASSOC message. */ - if (peer->cast_flags & MDF_BCLNT && + if ((peer->cast_flags & MDF_BCLNT) && peer->assoc != associd) break; diff --git a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c index d5c645504..3fca862c5 100644 --- a/ntpd/ntp_proto.c +++ b/ntpd/ntp_proto.c @@ -470,8 +470,8 @@ receive( restrict_mask = ntp_monitor(rbufp, restrict_mask); if (restrict_mask & RES_LIMITED) { sys_limitrejected++; - if (!(restrict_mask & RES_KOD) || hismode == - MODE_BROADCAST) + if (!(restrict_mask & RES_KOD) || MODE_BROADCAST == + hismode || MODE_SERVER == hismode) return; /* rate exceeded */ if (hismode == MODE_CLIENT) @@ -3418,7 +3418,7 @@ local_refid( { endpt * unicast_ep; - if (!(INT_MCASTIF & p->dstadr->flags)) + if (p->dstadr != NULL && !(INT_MCASTIF & p->dstadr->flags)) unicast_ep = p->dstadr; else unicast_ep = findinterface(&p->srcadr);