Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-release-src > by-pkgid > 0b1d47b1c6f4110a2d764d40ac25359d > files > 44

ntp-4.2.6p5-33.mga6.src.rpm

diff -up ntp-4.2.6p5/ntpd/ntp_proto.c.cve-2015-7979 ntp-4.2.6p5/ntpd/ntp_proto.c
--- ntp-4.2.6p5/ntpd/ntp_proto.c.cve-2015-7979	2016-01-21 14:20:45.760431895 +0100
+++ ntp-4.2.6p5/ntpd/ntp_proto.c	2016-01-21 14:46:13.027106826 +0100
@@ -1127,7 +1127,8 @@ receive(
 		report_event(PEVNT_AUTH, peer, "crypto_NAK");
 		peer->flash |= TEST5;		/* bad auth */
 		peer->badauth++;
-		if (peer->flags & FLAG_PREEMPT) {
+		if (peer->flags & FLAG_PREEMPT && hismode != MODE_BROADCAST &&
+		    !(peer->flash & (TEST2 | TEST3))) {
 			unpeer(peer);
 			return;
 		}
@@ -1153,7 +1154,8 @@ receive(
 		if (has_mac &&
 		    (hismode == MODE_ACTIVE || hismode == MODE_PASSIVE))
 			fast_xmit(rbufp, MODE_ACTIVE, 0, restrict_mask);
-		if (peer->flags & FLAG_PREEMPT) {
+		if (peer->flags & FLAG_PREEMPT && hismode != MODE_BROADCAST &&
+		    !(peer->flash & (TEST2 | TEST3))) {
 			unpeer(peer);
 			return;
 		}