tstellar / rpms / ntp

Forked from rpms/ntp 3 years ago
Clone
8ad9d6b
diff -up ntp-4.2.6p5/ntpd/ntp_proto.c.cve-2015-1799 ntp-4.2.6p5/ntpd/ntp_proto.c
8ad9d6b
--- ntp-4.2.6p5/ntpd/ntp_proto.c.cve-2015-1799	2015-04-08 13:06:43.083810350 +0200
8ad9d6b
+++ ntp-4.2.6p5/ntpd/ntp_proto.c	2015-04-08 13:08:12.679980322 +0200
8ad9d6b
@@ -1101,16 +1101,6 @@ receive(
8ad9d6b
 	}
8ad9d6b
 
8ad9d6b
 	/*
8ad9d6b
-	 * Update the state variables.
8ad9d6b
-	 */
8ad9d6b
-	if (peer->flip == 0) {
8ad9d6b
-		if (hismode != MODE_BROADCAST)
8ad9d6b
-			peer->rec = p_xmt;
8ad9d6b
-		peer->dst = rbufp->recv_time;
8ad9d6b
-	}
8ad9d6b
-	peer->xmt = p_xmt;
8ad9d6b
-
8ad9d6b
-	/*
8ad9d6b
 	 * If this is a crypto_NAK, the server cannot authenticate a
8ad9d6b
 	 * client packet. The server might have just changed keys. Clear
8ad9d6b
 	 * the association and restart the protocol.
8ad9d6b
@@ -1157,6 +1147,16 @@ receive(
8ad9d6b
 	}
8ad9d6b
 
8ad9d6b
 	/*
8ad9d6b
+	 * Update the state variables.
8ad9d6b
+	 */
8ad9d6b
+	if (peer->flip == 0) {
8ad9d6b
+		if (hismode != MODE_BROADCAST)
8ad9d6b
+			peer->rec = p_xmt;
8ad9d6b
+		peer->dst = rbufp->recv_time;
8ad9d6b
+	}
8ad9d6b
+	peer->xmt = p_xmt;
8ad9d6b
+
8ad9d6b
+	/*
8ad9d6b
 	 * Set the peer ppoll to the maximum of the packet ppoll and the
8ad9d6b
 	 * peer minpoll. If a kiss-o'-death, set the peer minpoll to
8ad9d6b
 	 * this maximumn and advance the headway to give the sender some