File ntp-CVE-2015-1799.patch of Package ntp.500
--- ntpd/ntp_proto.c.orig 2015-04-07 16:19:40.483348172 +0200
+++ ntpd/ntp_proto.c 2015-04-07 16:18:33.884424532 +0200
@@ -1094,16 +1094,6 @@
}
/*
- * Update the state variables.
- */
- if (peer->flip == 0) {
- if (hismode != MODE_BROADCAST)
- peer->rec = p_xmt;
- peer->dst = rbufp->recv_time;
- }
- peer->xmt = p_xmt;
-
- /*
* If this is a crypto_NAK, the server cannot authenticate a
* client packet. The server might have just changed keys. Clear
* the association and restart the protocol.
@@ -1140,6 +1150,16 @@
}
/*
+ * Update the state variables.
+ */
+ if (peer->flip == 0) {
+ if (hismode != MODE_BROADCAST)
+ peer->rec = p_xmt;
+ peer->dst = rbufp->recv_time;
+ }
+ peer->xmt = p_xmt;
+
+ /*
* Set the peer ppoll to the maximum of the packet ppoll and the
* peer minpoll. If a kiss-o'-death, set the peer minpoll to
* this maximumn and advance the headway to give the sender some