Commit 2aaab9a0 authored by Adam Langley's avatar Adam Langley Committed by David S. Miller

tcp: (whitespace only) fix confusing indentation

The indentation in part of tcp_minisocks makes it look like one of the if
statements is much more important than it actually is.
Signed-off-by: default avatarAdam Langley <agl@imperialviolet.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 827ebd64
...@@ -618,89 +618,87 @@ struct sock *tcp_check_req(struct sock *sk,struct sk_buff *skb, ...@@ -618,89 +618,87 @@ struct sock *tcp_check_req(struct sock *sk,struct sk_buff *skb,
/* In sequence, PAWS is OK. */ /* In sequence, PAWS is OK. */
if (tmp_opt.saw_tstamp && !after(TCP_SKB_CB(skb)->seq, tcp_rsk(req)->rcv_isn + 1)) if (tmp_opt.saw_tstamp && !after(TCP_SKB_CB(skb)->seq, tcp_rsk(req)->rcv_isn + 1))
req->ts_recent = tmp_opt.rcv_tsval; req->ts_recent = tmp_opt.rcv_tsval;
if (TCP_SKB_CB(skb)->seq == tcp_rsk(req)->rcv_isn) { if (TCP_SKB_CB(skb)->seq == tcp_rsk(req)->rcv_isn) {
/* Truncate SYN, it is out of window starting /* Truncate SYN, it is out of window starting
at tcp_rsk(req)->rcv_isn + 1. */ at tcp_rsk(req)->rcv_isn + 1. */
flg &= ~TCP_FLAG_SYN; flg &= ~TCP_FLAG_SYN;
} }
/* RFC793: "second check the RST bit" and /* RFC793: "second check the RST bit" and
* "fourth, check the SYN bit" * "fourth, check the SYN bit"
*/ */
if (flg & (TCP_FLAG_RST|TCP_FLAG_SYN)) { if (flg & (TCP_FLAG_RST|TCP_FLAG_SYN)) {
TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_ATTEMPTFAILS); TCP_INC_STATS_BH(sock_net(sk), TCP_MIB_ATTEMPTFAILS);
goto embryonic_reset; goto embryonic_reset;
} }
/* ACK sequence verified above, just make sure ACK is /* ACK sequence verified above, just make sure ACK is
* set. If ACK not set, just silently drop the packet. * set. If ACK not set, just silently drop the packet.
*/ */
if (!(flg & TCP_FLAG_ACK)) if (!(flg & TCP_FLAG_ACK))
return NULL; return NULL;
/* If TCP_DEFER_ACCEPT is set, drop bare ACK. */
if (inet_csk(sk)->icsk_accept_queue.rskq_defer_accept &&
TCP_SKB_CB(skb)->end_seq == tcp_rsk(req)->rcv_isn + 1) {
inet_rsk(req)->acked = 1;
return NULL;
}
/* OK, ACK is valid, create big socket and /* If TCP_DEFER_ACCEPT is set, drop bare ACK. */
* feed this segment to it. It will repeat all if (inet_csk(sk)->icsk_accept_queue.rskq_defer_accept &&
* the tests. THIS SEGMENT MUST MOVE SOCKET TO TCP_SKB_CB(skb)->end_seq == tcp_rsk(req)->rcv_isn + 1) {
* ESTABLISHED STATE. If it will be dropped after inet_rsk(req)->acked = 1;
* socket is created, wait for troubles. return NULL;
*/ }
child = inet_csk(sk)->icsk_af_ops->syn_recv_sock(sk, skb,
req, NULL); /* OK, ACK is valid, create big socket and
if (child == NULL) * feed this segment to it. It will repeat all
goto listen_overflow; * the tests. THIS SEGMENT MUST MOVE SOCKET TO
* ESTABLISHED STATE. If it will be dropped after
* socket is created, wait for troubles.
*/
child = inet_csk(sk)->icsk_af_ops->syn_recv_sock(sk, skb, req, NULL);
if (child == NULL)
goto listen_overflow;
#ifdef CONFIG_TCP_MD5SIG #ifdef CONFIG_TCP_MD5SIG
else { else {
/* Copy over the MD5 key from the original socket */ /* Copy over the MD5 key from the original socket */
struct tcp_md5sig_key *key; struct tcp_md5sig_key *key;
struct tcp_sock *tp = tcp_sk(sk); struct tcp_sock *tp = tcp_sk(sk);
key = tp->af_specific->md5_lookup(sk, child); key = tp->af_specific->md5_lookup(sk, child);
if (key != NULL) { if (key != NULL) {
/* /*
* We're using one, so create a matching key on the * We're using one, so create a matching key on the
* newsk structure. If we fail to get memory then we * newsk structure. If we fail to get memory then we
* end up not copying the key across. Shucks. * end up not copying the key across. Shucks.
*/ */
char *newkey = kmemdup(key->key, key->keylen, char *newkey = kmemdup(key->key, key->keylen,
GFP_ATOMIC); GFP_ATOMIC);
if (newkey) { if (newkey) {
if (!tcp_alloc_md5sig_pool()) if (!tcp_alloc_md5sig_pool())
BUG(); BUG();
tp->af_specific->md5_add(child, child, tp->af_specific->md5_add(child, child, newkey,
newkey, key->keylen);
key->keylen);
}
} }
} }
}
#endif #endif
inet_csk_reqsk_queue_unlink(sk, req, prev); inet_csk_reqsk_queue_unlink(sk, req, prev);
inet_csk_reqsk_queue_removed(sk, req); inet_csk_reqsk_queue_removed(sk, req);
inet_csk_reqsk_queue_add(sk, req, child); inet_csk_reqsk_queue_add(sk, req, child);
return child; return child;
listen_overflow: listen_overflow:
if (!sysctl_tcp_abort_on_overflow) { if (!sysctl_tcp_abort_on_overflow) {
inet_rsk(req)->acked = 1; inet_rsk(req)->acked = 1;
return NULL; return NULL;
} }
embryonic_reset: embryonic_reset:
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_EMBRYONICRSTS); NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_EMBRYONICRSTS);
if (!(flg & TCP_FLAG_RST)) if (!(flg & TCP_FLAG_RST))
req->rsk_ops->send_reset(sk, skb); req->rsk_ops->send_reset(sk, skb);
inet_csk_reqsk_queue_drop(sk, req, prev); inet_csk_reqsk_queue_drop(sk, req, prev);
return NULL; return NULL;
} }
/* /*
......
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