aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 7de6184d4bd8..981d1203b152 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -2342,7 +2342,7 @@ static int tcp_ack_update_window(struct sock *sk, struct tcp_sock *tp,
2342 2342
2343 if (nwin > tp->max_window) { 2343 if (nwin > tp->max_window) {
2344 tp->max_window = nwin; 2344 tp->max_window = nwin;
2345 tcp_sync_mss(sk, tp->pmtu_cookie); 2345 tcp_sync_mss(sk, inet_csk(sk)->icsk_pmtu_cookie);
2346 } 2346 }
2347 } 2347 }
2348 } 2348 }
@@ -3967,12 +3967,12 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,
3967 struct tcphdr *th, unsigned len) 3967 struct tcphdr *th, unsigned len)
3968{ 3968{
3969 struct tcp_sock *tp = tcp_sk(sk); 3969 struct tcp_sock *tp = tcp_sk(sk);
3970 struct inet_connection_sock *icsk = inet_csk(sk);
3970 int saved_clamp = tp->rx_opt.mss_clamp; 3971 int saved_clamp = tp->rx_opt.mss_clamp;
3971 3972
3972 tcp_parse_options(skb, &tp->rx_opt, 0); 3973 tcp_parse_options(skb, &tp->rx_opt, 0);
3973 3974
3974 if (th->ack) { 3975 if (th->ack) {
3975 struct inet_connection_sock *icsk;
3976 /* rfc793: 3976 /* rfc793:
3977 * "If the state is SYN-SENT then 3977 * "If the state is SYN-SENT then
3978 * first check the ACK bit 3978 * first check the ACK bit
@@ -4061,7 +4061,7 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,
4061 if (tp->rx_opt.sack_ok && sysctl_tcp_fack) 4061 if (tp->rx_opt.sack_ok && sysctl_tcp_fack)
4062 tp->rx_opt.sack_ok |= 2; 4062 tp->rx_opt.sack_ok |= 2;
4063 4063
4064 tcp_sync_mss(sk, tp->pmtu_cookie); 4064 tcp_sync_mss(sk, icsk->icsk_pmtu_cookie);
4065 tcp_initialize_rcv_mss(sk); 4065 tcp_initialize_rcv_mss(sk);
4066 4066
4067 /* Remember, tcp_poll() does not lock socket! 4067 /* Remember, tcp_poll() does not lock socket!
@@ -4071,8 +4071,6 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,
4071 mb(); 4071 mb();
4072 tcp_set_state(sk, TCP_ESTABLISHED); 4072 tcp_set_state(sk, TCP_ESTABLISHED);
4073 4073
4074 icsk = inet_csk(sk);
4075
4076 /* Make sure socket is routed, for correct metrics. */ 4074 /* Make sure socket is routed, for correct metrics. */
4077 icsk->icsk_af_ops->rebuild_header(sk); 4075 icsk->icsk_af_ops->rebuild_header(sk);
4078 4076
@@ -4173,7 +4171,7 @@ discard:
4173 if (tp->ecn_flags&TCP_ECN_OK) 4171 if (tp->ecn_flags&TCP_ECN_OK)
4174 sock_set_flag(sk, SOCK_NO_LARGESEND); 4172 sock_set_flag(sk, SOCK_NO_LARGESEND);
4175 4173
4176 tcp_sync_mss(sk, tp->pmtu_cookie); 4174 tcp_sync_mss(sk, icsk->icsk_pmtu_cookie);
4177 tcp_initialize_rcv_mss(sk); 4175 tcp_initialize_rcv_mss(sk);
4178 4176
4179 4177