]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Never send KoD rate limiting response to MODE_SERVER response.
authorDave Hart <hart@ntp.org>
Tue, 29 Nov 2011 13:33:26 +0000 (13:33 +0000)
committerDave Hart <hart@ntp.org>
Tue, 29 Nov 2011 13:33:26 +0000 (13:33 +0000)
bk: 4ed4df26bo_5lzR0bTJ3O-7Pds94Yg

ChangeLog
ntpd/ntp_crypto.c
ntpd/ntp_proto.c

index 338873b2973ce089e68f68def6e9c9ea95b98b45..442c31487cb7d5c15eb9aa7aa2d1bcd114654a27 100644 (file)
--- 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 <stenn@ntp.org>
 
index 609e8528cc1f7e1a25f6ee1c2d025ec77f3f1e63..38f38a1d3533852961ee483ad57f6d3a50e6fca2 100644 (file)
@@ -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;
 
index d5c645504412de56daab11f7145c8526d1aac7b4..3fca862c5657d47ff94784e26364e9b9b4395822 100644 (file)
@@ -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);