diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-05-07 02:55:41 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-05-07 02:55:41 +0000 |
commit | dcec8a13bf565e47942a1751a9cec21bec5648fe (patch) | |
tree | 548b69625b18cc2e88c3e68d0923be546c9ebb03 /net/ipv4/syncookies.c | |
parent | 2e0f55e79c49509b7ff70ff1a10e1e9e90a3dfd4 (diff) |
o Merge with Linux 2.1.99.
o Fix ancient bug in the ELF loader making ldd crash.
o Fix ancient bug in the keyboard code for SGI, SNI and Jazz.
Diffstat (limited to 'net/ipv4/syncookies.c')
-rw-r--r-- | net/ipv4/syncookies.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c index 00dd0a8ef..a3e3be0f1 100644 --- a/net/ipv4/syncookies.c +++ b/net/ipv4/syncookies.c @@ -9,11 +9,9 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. * - * $Id: syncookies.c,v 1.4 1998/03/08 05:56:34 davem Exp $ + * $Id: syncookies.c,v 1.5 1998/04/03 09:49:46 freitag Exp $ * * Missing: IPv6 support. - * Some counter so that the Administrator can see when the machine - * is under a syn flood attack. */ #include <linux/config.h> @@ -88,6 +86,8 @@ __u32 cookie_v4_init_sequence(struct sock *sk, struct sk_buff *skb, found: *mssp = w[-1]; + net_statistics.SyncookiesSent++; + isn |= i; return isn; } @@ -110,8 +110,9 @@ static inline int cookie_check(struct sk_buff *skb, __u32 cookie) __u32 seq; if ((jiffies - tcp_lastsynq_overflow) > TCP_TIMEOUT_INIT - && tcp_lastsynq_overflow) + && tcp_lastsynq_overflow) { return 0; + } mssind = cookie & 7; cookie &= ~7; @@ -157,8 +158,12 @@ cookie_v4_check(struct sock *sk, struct sk_buff *skb, struct ip_options *opt) return sk; mss = cookie_check(skb, cookie); - if (mss == 0) + if (mss == 0) { + net_statistics.SyncookiesFailed++; return sk; + } + + net_statistics.SyncookiesRecv++; req = tcp_openreq_alloc(); if (req == NULL) |