]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sctp/sm_make_chunk.c
Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/vitb/linux...
[linux-2.6-omap-h63xx.git] / net / sctp / sm_make_chunk.c
index 7745bdea7817acab1709df3e454785822ac2933a..507dff72c5853508279847672c84dcab460436cf 100644 (file)
@@ -1447,8 +1447,16 @@ no_hmac:
        /* Check to see if the cookie is stale.  If there is already
         * an association, there is no need to check cookie's expiration
         * for init collision case of lost COOKIE ACK.
+        * If skb has been timestamped, then use the stamp, otherwise
+        * use current time.  This introduces a small possibility that
+        * that a cookie may be considered expired, but his would only slow
+        * down the new association establishment instead of every packet.
         */
-       skb_get_timestamp(skb, &tv);
+       if (sock_flag(ep->base.sk, SOCK_TIMESTAMP))
+               skb_get_timestamp(skb, &tv);
+       else
+               do_gettimeofday(&tv);
+
        if (!asoc && tv_lt(bear_cookie->expiration, tv)) {
                __u16 len;
                /*