diff options
author | Florian Westphal <fw@strlen.de> | 2010-06-03 04:43:44 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-05 13:23:14 +0400 |
commit | af9b4738574b46025de7ccbe75c7b24fd8914379 (patch) | |
tree | 6d05b82261ce76e6ecf00131c667292b62d16adf /net/ipv4/syncookies.c | |
parent | 2a1d4bd46047efff513600d7ff422bc344f540a6 (diff) | |
download | linux-af9b4738574b46025de7ccbe75c7b24fd8914379.tar.xz |
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 <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/syncookies.c')
-rw-r--r-- | net/ipv4/syncookies.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c index 5c24db4a3c91..c9dac8615958 100644 --- a/net/ipv4/syncookies.c +++ b/net/ipv4/syncookies.c @@ -266,7 +266,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb, struct rtable *rt; __u8 rcv_wscale; - if (!sysctl_tcp_syncookies || !th->ack) + if (!sysctl_tcp_syncookies || !th->ack || th->rst) goto out; if (tcp_synq_no_recent_overflow(sk) || |