aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/sctp/input.c6
-rw-r--r--net/sctp/sm_make_chunk.c10
2 files changed, 9 insertions, 7 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 4714882ada96..64f630102532 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -218,12 +218,6 @@ int sctp_rcv(struct sk_buff *skb)
218 } 218 }
219 } 219 }
220 220
221 /* SCTP seems to always need a timestamp right now (FIXME) */
222 if (skb->tstamp.off_sec == 0) {
223 __net_timestamp(skb);
224 sock_enable_timestamp(sk);
225 }
226
227 if (!xfrm_policy_check(sk, XFRM_POLICY_IN, skb, family)) 221 if (!xfrm_policy_check(sk, XFRM_POLICY_IN, skb, family))
228 goto discard_release; 222 goto discard_release;
229 nf_reset(skb); 223 nf_reset(skb);
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 7745bdea7817..507dff72c585 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1447,8 +1447,16 @@ no_hmac:
1447 /* Check to see if the cookie is stale. If there is already 1447 /* Check to see if the cookie is stale. If there is already
1448 * an association, there is no need to check cookie's expiration 1448 * an association, there is no need to check cookie's expiration
1449 * for init collision case of lost COOKIE ACK. 1449 * for init collision case of lost COOKIE ACK.
1450 * If skb has been timestamped, then use the stamp, otherwise
1451 * use current time. This introduces a small possibility that
1452 * that a cookie may be considered expired, but his would only slow
1453 * down the new association establishment instead of every packet.
1450 */ 1454 */
1451 skb_get_timestamp(skb, &tv); 1455 if (sock_flag(ep->base.sk, SOCK_TIMESTAMP))
1456 skb_get_timestamp(skb, &tv);
1457 else
1458 do_gettimeofday(&tv);
1459
1452 if (!asoc && tv_lt(bear_cookie->expiration, tv)) { 1460 if (!asoc && tv_lt(bear_cookie->expiration, tv)) {
1453 __u16 len; 1461 __u16 len;
1454 /* 1462 /*