diff options
| author | Florian Westphal <[email protected]> | 2010-06-03 00:43:44 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2010-06-05 09:23:14 +0000 |
| commit | af9b4738574b46025de7ccbe75c7b24fd8914379 (patch) | |
| tree | 6d05b82261ce76e6ecf00131c667292b62d16adf /net/ipv4/tcp_ipv4.c | |
| parent | syncookies: make v4/v6 synflood warning behaviour the same (diff) | |
| download | kernel-af9b4738574b46025de7ccbe75c7b24fd8914379.tar.gz kernel-af9b4738574b46025de7ccbe75c7b24fd8914379.zip | |
syncookies: avoid unneeded tcp header flag double check
caller: if (!th->rst && !th->syn && th->ack)
callee: if (!th->ack)
make the caller only check for !syn (common for 3whs), and move
the !rst / ack test to the callee.
Signed-off-by: Florian Westphal <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
| -rw-r--r-- | net/ipv4/tcp_ipv4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index a13f881e5037..6558dfd899da 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -1506,7 +1506,7 @@ static struct sock *tcp_v4_hnd_req(struct sock *sk, struct sk_buff *skb) } #ifdef CONFIG_SYN_COOKIES - if (!th->rst && !th->syn && th->ack) + if (!th->syn) sk = cookie_v4_check(sk, skb, &(IPCB(skb)->opt)); #endif return sk; |
