diff options
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index bf2e23086bce..7de6184d4bd8 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -4071,8 +4071,10 @@ 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 | |||
4074 | /* Make sure socket is routed, for correct metrics. */ | 4076 | /* Make sure socket is routed, for correct metrics. */ |
4075 | tp->af_specific->rebuild_header(sk); | 4077 | icsk->icsk_af_ops->rebuild_header(sk); |
4076 | 4078 | ||
4077 | tcp_init_metrics(sk); | 4079 | tcp_init_metrics(sk); |
4078 | 4080 | ||
@@ -4098,8 +4100,6 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb, | |||
4098 | sk_wake_async(sk, 0, POLL_OUT); | 4100 | sk_wake_async(sk, 0, POLL_OUT); |
4099 | } | 4101 | } |
4100 | 4102 | ||
4101 | icsk = inet_csk(sk); | ||
4102 | |||
4103 | if (sk->sk_write_pending || | 4103 | if (sk->sk_write_pending || |
4104 | icsk->icsk_accept_queue.rskq_defer_accept || | 4104 | icsk->icsk_accept_queue.rskq_defer_accept || |
4105 | icsk->icsk_ack.pingpong) { | 4105 | icsk->icsk_ack.pingpong) { |
@@ -4220,6 +4220,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, | |||
4220 | struct tcphdr *th, unsigned len) | 4220 | struct tcphdr *th, unsigned len) |
4221 | { | 4221 | { |
4222 | struct tcp_sock *tp = tcp_sk(sk); | 4222 | struct tcp_sock *tp = tcp_sk(sk); |
4223 | struct inet_connection_sock *icsk = inet_csk(sk); | ||
4223 | int queued = 0; | 4224 | int queued = 0; |
4224 | 4225 | ||
4225 | tp->rx_opt.saw_tstamp = 0; | 4226 | tp->rx_opt.saw_tstamp = 0; |
@@ -4236,7 +4237,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, | |||
4236 | goto discard; | 4237 | goto discard; |
4237 | 4238 | ||
4238 | if(th->syn) { | 4239 | if(th->syn) { |
4239 | if(tp->af_specific->conn_request(sk, skb) < 0) | 4240 | if (icsk->icsk_af_ops->conn_request(sk, skb) < 0) |
4240 | return 1; | 4241 | return 1; |
4241 | 4242 | ||
4242 | /* Now we have several options: In theory there is | 4243 | /* Now we have several options: In theory there is |
@@ -4349,7 +4350,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb, | |||
4349 | /* Make sure socket is routed, for | 4350 | /* Make sure socket is routed, for |
4350 | * correct metrics. | 4351 | * correct metrics. |
4351 | */ | 4352 | */ |
4352 | tp->af_specific->rebuild_header(sk); | 4353 | icsk->icsk_af_ops->rebuild_header(sk); |
4353 | 4354 | ||
4354 | tcp_init_metrics(sk); | 4355 | tcp_init_metrics(sk); |
4355 | 4356 | ||