syncookies: avoid unneeded tcp header flag double check
authorFlorian Westphal <fw@strlen.de>
Thu, 3 Jun 2010 00:43:44 +0000 (00:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 5 Jun 2010 09:23:14 +0000 (02:23 -0700)
commitaf9b4738574b46025de7ccbe75c7b24fd8914379
tree6d05b82261ce76e6ecf00131c667292b62d16adf
parent2a1d4bd46047efff513600d7ff422bc344f540a6
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>
net/ipv4/syncookies.c
net/ipv4/tcp_ipv4.c
net/ipv6/syncookies.c
net/ipv6/tcp_ipv6.c