diff options
author | Florian Westphal <fw@strlen.de> | 2009-04-19 09:43:48 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-20 02:25:26 -0700 |
commit | a0f82f64e26929776c58a5c93c2ecb38e3d82815 (patch) | |
tree | 8c39812fc6fc8133cc28944e38b44c941d8fa3ce /net/ipv6/syncookies.c | |
parent | 7eebb0b28f755e297d355a205bb04945b256db6b (diff) | |
download | linux-a0f82f64e26929776c58a5c93c2ecb38e3d82815.tar.gz linux-a0f82f64e26929776c58a5c93c2ecb38e3d82815.tar.bz2 linux-a0f82f64e26929776c58a5c93c2ecb38e3d82815.zip |
syncookies: remove last_synq_overflow from struct tcp_sock
last_synq_overflow eats 4 or 8 bytes in struct tcp_sock, even
though it is only used when a listening sockets syn queue
is full.
We can (ab)use rx_opt.ts_recent_stamp to store the same information;
it is not used otherwise as long as a socket is in listen state.
Move linger2 around to avoid splitting struct mtu_probe
across cacheline boundary on 32 bit arches.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/syncookies.c')
-rw-r--r-- | net/ipv6/syncookies.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/syncookies.c b/net/ipv6/syncookies.c index 711175e0571f..8c2513982b61 100644 --- a/net/ipv6/syncookies.c +++ b/net/ipv6/syncookies.c @@ -131,7 +131,7 @@ __u32 cookie_v6_init_sequence(struct sock *sk, struct sk_buff *skb, __u16 *mssp) int mssind; const __u16 mss = *mssp; - tcp_sk(sk)->last_synq_overflow = jiffies; + tcp_synq_overflow(sk); for (mssind = 0; mss > msstab[mssind + 1]; mssind++) ; @@ -175,7 +175,7 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) if (!sysctl_tcp_syncookies || !th->ack) goto out; - if (time_after(jiffies, tp->last_synq_overflow + TCP_TIMEOUT_INIT) || + if (tcp_synq_no_recent_overflow(sk) || (mss = cookie_check(skb, cookie)) == 0) { NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_SYNCOOKIESFAILED); goto out; |