diff options
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index ea678b62e94f..d9bfaea34322 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -3860,7 +3860,7 @@ static bool tcp_parse_aligned_timestamp(struct tcp_sock *tp, const struct tcphdr | |||
3860 | ++ptr; | 3860 | ++ptr; |
3861 | tp->rx_opt.rcv_tsval = ntohl(*ptr); | 3861 | tp->rx_opt.rcv_tsval = ntohl(*ptr); |
3862 | ++ptr; | 3862 | ++ptr; |
3863 | tp->rx_opt.rcv_tsecr = ntohl(*ptr); | 3863 | tp->rx_opt.rcv_tsecr = ntohl(*ptr) - tp->tsoffset; |
3864 | return true; | 3864 | return true; |
3865 | } | 3865 | } |
3866 | return false; | 3866 | return false; |
@@ -3884,7 +3884,11 @@ static bool tcp_fast_parse_options(const struct sk_buff *skb, | |||
3884 | if (tcp_parse_aligned_timestamp(tp, th)) | 3884 | if (tcp_parse_aligned_timestamp(tp, th)) |
3885 | return true; | 3885 | return true; |
3886 | } | 3886 | } |
3887 | |||
3887 | tcp_parse_options(skb, &tp->rx_opt, hvpp, 1, NULL); | 3888 | tcp_parse_options(skb, &tp->rx_opt, hvpp, 1, NULL); |
3889 | if (tp->rx_opt.saw_tstamp) | ||
3890 | tp->rx_opt.rcv_tsecr -= tp->tsoffset; | ||
3891 | |||
3888 | return true; | 3892 | return true; |
3889 | } | 3893 | } |
3890 | 3894 | ||
@@ -5665,6 +5669,8 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb, | |||
5665 | int saved_clamp = tp->rx_opt.mss_clamp; | 5669 | int saved_clamp = tp->rx_opt.mss_clamp; |
5666 | 5670 | ||
5667 | tcp_parse_options(skb, &tp->rx_opt, &hash_location, 0, &foc); | 5671 | tcp_parse_options(skb, &tp->rx_opt, &hash_location, 0, &foc); |
5672 | if (tp->rx_opt.saw_tstamp) | ||
5673 | tp->rx_opt.rcv_tsecr -= tp->tsoffset; | ||
5668 | 5674 | ||
5669 | if (th->ack) { | 5675 | if (th->ack) { |
5670 | /* rfc793: | 5676 | /* rfc793: |