Commit 242b1bbe authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

tcp: remove one indentation level in tcp_create_openreq_child

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Acked-by: default avatarYuchung Cheng <ycheng@google.com>
Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 782e85c5
...@@ -449,13 +449,17 @@ struct sock *tcp_create_openreq_child(const struct sock *sk, ...@@ -449,13 +449,17 @@ struct sock *tcp_create_openreq_child(const struct sock *sk,
struct sk_buff *skb) struct sk_buff *skb)
{ {
struct sock *newsk = inet_csk_clone_lock(sk, req, GFP_ATOMIC); struct sock *newsk = inet_csk_clone_lock(sk, req, GFP_ATOMIC);
if (newsk) {
const struct inet_request_sock *ireq = inet_rsk(req); const struct inet_request_sock *ireq = inet_rsk(req);
struct tcp_request_sock *treq = tcp_rsk(req); struct tcp_request_sock *treq = tcp_rsk(req);
struct inet_connection_sock *newicsk = inet_csk(newsk); struct inet_connection_sock *newicsk;
struct tcp_sock *newtp = tcp_sk(newsk); struct tcp_sock *oldtp, *newtp;
struct tcp_sock *oldtp = tcp_sk(sk);
if (!newsk)
return NULL;
newicsk = inet_csk(newsk);
newtp = tcp_sk(newsk);
oldtp = tcp_sk(sk);
smc_check_reset_syn_req(oldtp, req, newtp); smc_check_reset_syn_req(oldtp, req, newtp);
...@@ -528,8 +532,7 @@ struct sock *tcp_create_openreq_child(const struct sock *sk, ...@@ -528,8 +532,7 @@ struct sock *tcp_create_openreq_child(const struct sock *sk,
newtp->rx_opt.snd_wscale = newtp->rx_opt.rcv_wscale = 0; newtp->rx_opt.snd_wscale = newtp->rx_opt.rcv_wscale = 0;
newtp->window_clamp = min(newtp->window_clamp, 65535U); newtp->window_clamp = min(newtp->window_clamp, 65535U);
} }
newtp->snd_wnd = (ntohs(tcp_hdr(skb)->window) << newtp->snd_wnd = ntohs(tcp_hdr(skb)->window) << newtp->rx_opt.snd_wscale;
newtp->rx_opt.snd_wscale);
newtp->max_window = newtp->snd_wnd; newtp->max_window = newtp->snd_wnd;
if (newtp->rx_opt.tstamp_ok) { if (newtp->rx_opt.tstamp_ok) {
...@@ -561,7 +564,7 @@ struct sock *tcp_create_openreq_child(const struct sock *sk, ...@@ -561,7 +564,7 @@ struct sock *tcp_create_openreq_child(const struct sock *sk,
newtp->rack.dsack_seen = 0; newtp->rack.dsack_seen = 0;
__TCP_INC_STATS(sock_net(sk), TCP_MIB_PASSIVEOPENS); __TCP_INC_STATS(sock_net(sk), TCP_MIB_PASSIVEOPENS);
}
return newsk; return newsk;
} }
EXPORT_SYMBOL(tcp_create_openreq_child); EXPORT_SYMBOL(tcp_create_openreq_child);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment