patch-2.1.79 linux/net/ipv4/utils.c
Next file: linux/net/ipv6/Config.in
Previous file: linux/net/ipv4/udp.c
Back to the patch index
Back to the overall index
- Lines: 34
- Date:
Mon Jan 12 15:28:28 1998
- Orig file:
v2.1.78/linux/net/ipv4/utils.c
- Orig date:
Mon Dec 1 12:04:17 1997
diff -u --recursive --new-file v2.1.78/linux/net/ipv4/utils.c linux/net/ipv4/utils.c
@@ -6,7 +6,7 @@
* Various kernel-resident INET utility functions; mainly
* for format conversion and debugging output.
*
- * Version: $Id: utils.c,v 1.5 1997/09/17 18:50:31 freitag Exp $
+ * Version: $Id: utils.c,v 1.6 1997/12/13 21:53:03 kuznet Exp $
*
* Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
*
@@ -89,24 +89,3 @@
return(htonl(l));
}
-/*
- * This enforces a rate limit: not more than one kernel message
- * every 5secs to make a denial-of-service attack impossible.
- *
- * All warning printk()s should be guarded by this function.
- */
-int net_ratelimit(void)
-{
- static unsigned long last_msg;
- static int missed;
-
- if ((jiffies - last_msg) >= 5*HZ) {
- if (missed)
- printk(KERN_WARNING "ipv4: (%d messages suppressed. Flood?)\n", missed);
- missed = 0;
- last_msg = jiffies;
- return 1;
- }
- missed++;
- return 0;
-}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov