Commit 09a59001 authored by Florian Westphal's avatar Florian Westphal

netfilter: conntrack: remove unneeded indent level

After previous patch, the conditional branch is obsolete, reformat it.
gcc generates same code as before this change.
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
parent 6e250dcb
...@@ -663,16 +663,12 @@ tcp_in_window(struct nf_conn *ct, enum ip_conntrack_dir dir, ...@@ -663,16 +663,12 @@ tcp_in_window(struct nf_conn *ct, enum ip_conntrack_dir dir,
return nf_tcp_log_invalid(skb, ct, hook_state, sender, NFCT_TCP_IGNORE, return nf_tcp_log_invalid(skb, ct, hook_state, sender, NFCT_TCP_IGNORE,
"ignored ACK under lower bound %u (possible overly delayed)", "ignored ACK under lower bound %u (possible overly delayed)",
receiver->td_end - MAXACKWINDOW(sender) - 1); receiver->td_end - MAXACKWINDOW(sender) - 1);
if (1) {
/* /* Take into account window scaling (RFC 1323). */
* Take into account window scaling (RFC 1323).
*/
if (!tcph->syn) if (!tcph->syn)
win <<= sender->td_scale; win <<= sender->td_scale;
/* /* Update sender data. */
* Update sender data.
*/
swin = win + (sack - ack); swin = win + (sack - ack);
if (sender->td_maxwin < swin) if (sender->td_maxwin < swin)
sender->td_maxwin = swin; sender->td_maxwin = swin;
...@@ -684,13 +680,12 @@ tcp_in_window(struct nf_conn *ct, enum ip_conntrack_dir dir, ...@@ -684,13 +680,12 @@ tcp_in_window(struct nf_conn *ct, enum ip_conntrack_dir dir,
if (!(sender->flags & IP_CT_TCP_FLAG_MAXACK_SET)) { if (!(sender->flags & IP_CT_TCP_FLAG_MAXACK_SET)) {
sender->td_maxack = ack; sender->td_maxack = ack;
sender->flags |= IP_CT_TCP_FLAG_MAXACK_SET; sender->flags |= IP_CT_TCP_FLAG_MAXACK_SET;
} else if (after(ack, sender->td_maxack)) } else if (after(ack, sender->td_maxack)) {
sender->td_maxack = ack; sender->td_maxack = ack;
} }
}
/* /* Update receiver data. */
* Update receiver data.
*/
if (receiver->td_maxwin != 0 && after(end, sender->td_maxend)) if (receiver->td_maxwin != 0 && after(end, sender->td_maxend))
receiver->td_maxwin += end - sender->td_maxend; receiver->td_maxwin += end - sender->td_maxend;
if (after(sack + win, receiver->td_maxend - 1)) { if (after(sack + win, receiver->td_maxend - 1)) {
...@@ -701,17 +696,15 @@ tcp_in_window(struct nf_conn *ct, enum ip_conntrack_dir dir, ...@@ -701,17 +696,15 @@ tcp_in_window(struct nf_conn *ct, enum ip_conntrack_dir dir,
if (ack == receiver->td_end) if (ack == receiver->td_end)
receiver->flags &= ~IP_CT_TCP_FLAG_DATA_UNACKNOWLEDGED; receiver->flags &= ~IP_CT_TCP_FLAG_DATA_UNACKNOWLEDGED;
/* /* Check retransmissions. */
* Check retransmissions.
*/
if (index == TCP_ACK_SET) { if (index == TCP_ACK_SET) {
if (state->last_dir == dir if (state->last_dir == dir &&
&& state->last_seq == seq state->last_seq == seq &&
&& state->last_ack == ack state->last_ack == ack &&
&& state->last_end == end state->last_end == end &&
&& state->last_win == win_raw) state->last_win == win_raw) {
state->retrans++; state->retrans++;
else { } else {
state->last_dir = dir; state->last_dir = dir;
state->last_seq = seq; state->last_seq = seq;
state->last_ack = ack; state->last_ack = ack;
...@@ -720,7 +713,6 @@ tcp_in_window(struct nf_conn *ct, enum ip_conntrack_dir dir, ...@@ -720,7 +713,6 @@ tcp_in_window(struct nf_conn *ct, enum ip_conntrack_dir dir,
state->retrans = 0; state->retrans = 0;
} }
} }
}
return NFCT_TCP_ACCEPT; return NFCT_TCP_ACCEPT;
} }
......
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