Blame SOURCES/ntp-4.2.6p5-cve-2015-7979.patch

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