diff options
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 2c2b13a999ea..609ff98aeb47 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -5313,11 +5313,6 @@ static bool tcp_validate_incoming(struct sock *sk, struct sk_buff *skb, | |||
5313 | goto discard; | 5313 | goto discard; |
5314 | } | 5314 | } |
5315 | 5315 | ||
5316 | /* ts_recent update must be made after we are sure that the packet | ||
5317 | * is in window. | ||
5318 | */ | ||
5319 | tcp_replace_ts_recent(tp, TCP_SKB_CB(skb)->seq); | ||
5320 | |||
5321 | /* step 3: check security and precedence [ignored] */ | 5316 | /* step 3: check security and precedence [ignored] */ |
5322 | 5317 | ||
5323 | /* step 4: Check for a SYN | 5318 | /* step 4: Check for a SYN |
@@ -5552,6 +5547,11 @@ step5: | |||
5552 | if (th->ack && tcp_ack(sk, skb, FLAG_SLOWPATH) < 0) | 5547 | if (th->ack && tcp_ack(sk, skb, FLAG_SLOWPATH) < 0) |
5553 | goto discard; | 5548 | goto discard; |
5554 | 5549 | ||
5550 | /* ts_recent update must be made after we are sure that the packet | ||
5551 | * is in window. | ||
5552 | */ | ||
5553 | tcp_replace_ts_recent(tp, TCP_SKB_CB(skb)->seq); | ||
5554 | |||
5555 | tcp_rcv_rtt_measure_ts(sk, skb); | 5555 | tcp_rcv_rtt_measure_ts(sk, skb); |
5556 | 5556 | ||
5557 | /* Process urgent data. */ | 5557 | /* Process urgent data. */ |
@@ -6130,6 +6130,11 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, | |||
6130 | } else | 6130 | } else |
6131 | goto discard; | 6131 | goto discard; |
6132 | 6132 | ||
6133 | /* ts_recent update must be made after we are sure that the packet | ||
6134 | * is in window. | ||
6135 | */ | ||
6136 | tcp_replace_ts_recent(tp, TCP_SKB_CB(skb)->seq); | ||
6137 | |||
6133 | /* step 6: check the URG bit */ | 6138 | /* step 6: check the URG bit */ |
6134 | tcp_urg(sk, skb, th); | 6139 | tcp_urg(sk, skb, th); |
6135 | 6140 | ||