linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] small doc update for /proc/sys/net/ipv4/icmp_rate{mask,limit}
@ 2001-12-12 12:27 Pierre Lombard
  2001-12-13  0:37 ` David S. Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Pierre Lombard @ 2001-12-12 12:27 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 196 bytes --]

Hi,

Comments in the C code are incorrect and the documentation is
outdated.

Attached patch is for 2.4.17-pre8 but probably applies cleanly
against 2.5.x too.

-- 
Best regards,
  Pierre Lombard

[-- Attachment #2: 20011212-icmpmask.diff --]
[-- Type: text/plain, Size: 1737 bytes --]

--- linux-2.4.17-pre8~/Documentation/networking/ip-sysctl.txt	Wed Dec 12 12:52:25 2001
+++ linux-2.4.17-pre8/Documentation/networking/ip-sysctl.txt	Wed Dec 12 12:53:17 2001
@@ -309,13 +309,20 @@
 	ICMP ECHO requests sent to it or just those to broadcast/multicast
 	addresses, respectively.
 
-icmp_destunreach_rate - INTEGER
-icmp_paramprob_rate - INTEGER
-icmp_timeexceed_rate - INTEGER
-icmp_echoreply_rate - INTEGER (not enabled per default)
-	Limit the maximal rates for sending ICMP packets to specific targets.
+icmp_ratelimit - INTEGER
+	Limit the maximal rates for sending ICMP packets whose type matches
+	icmp_ratemask (see below) to specific targets.
 	0 to disable any limiting, otherwise the maximal rate in jiffies(1)
-	See the source for more information.
+	Default: 1
+
+icmp_ratemask - INTEGER
+	Mask made of ICMP types for which rates are being limited.
+	Default: 6168
+	Note: 6168 = 0x1818 = 1<<ICMP_DEST_UNREACH + 1<<ICMP_SOURCE_QUENCH +
+	      1<<ICMP_TIME_EXCEEDED + 1<<ICMP_PARAMETERPROB, which means
+	      dest unreachable (3), source quench (4), time exceeded (11)
+	      and parameter problem (12) ICMP packets are rate limited
+	      (check values in icmp.h)
 
 icmp_ignore_bogus_error_responses - BOOLEAN
 	Some routers violate RFC 1122 by sending bogus responses to broadcast
--- linux-2.4.17-pre8~/net/ipv4/icmp.c	Wed Dec 12 12:48:56 2001
+++ linux-2.4.17-pre8/net/ipv4/icmp.c	Wed Dec 12 12:51:41 2001
@@ -154,8 +154,8 @@
  * 	it's bit position.
  *
  *	default: 
- *	dest unreachable (0x03), source quench (0x04),
- *	time exceeded (0x11), parameter problem (0x12)
+ *	dest unreachable (3), source quench (4),
+ *	time exceeded (11), parameter problem (12)
  */
 
 int sysctl_icmp_ratelimit = 1*HZ;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] small doc update for /proc/sys/net/ipv4/icmp_rate{mask,limit}
  2001-12-12 12:27 [PATCH] small doc update for /proc/sys/net/ipv4/icmp_rate{mask,limit} Pierre Lombard
@ 2001-12-13  0:37 ` David S. Miller
  2001-12-13  8:57   ` Pierre Lombard
  2001-12-13  8:59   ` David S. Miller
  0 siblings, 2 replies; 4+ messages in thread
From: David S. Miller @ 2001-12-13  0:37 UTC (permalink / raw)
  To: pierre.lombard; +Cc: linux-kernel


Your patch does not apply, did you edit this patch by hand
before submitting it?  The "#lines" in the patch chunks are
inaccurate.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] small doc update for /proc/sys/net/ipv4/icmp_rate{mask,limit}
  2001-12-13  0:37 ` David S. Miller
@ 2001-12-13  8:57   ` Pierre Lombard
  2001-12-13  8:59   ` David S. Miller
  1 sibling, 0 replies; 4+ messages in thread
From: Pierre Lombard @ 2001-12-13  8:57 UTC (permalink / raw)
  To: David S. Miller; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 398 bytes --]

On Wed, Dec 12, 2001 at 04:37:26PM -0800, David S. Miller wrote:

> Your patch does not apply, did you edit this patch by hand
> before submitting it?  The "#lines" in the patch chunks are
> inaccurate.

Yes.  I didn't thought it would break since it applied cleanly
here but it did :)

A fresh & unedited version against a vanilla 2.4.17-pre8 is
text-attached.

-- 
Best regards,
  Pierre Lombard

[-- Attachment #2: 20011213-icmpmask.diff --]
[-- Type: text/plain, Size: 1889 bytes --]

diff -urN linux-2.4.17-pre8/Documentation/networking/ip-sysctl.txt linux/Documentation/networking/ip-sysctl.txt
--- linux-2.4.17-pre8/Documentation/networking/ip-sysctl.txt	Wed May 16 19:21:45 2001
+++ linux/Documentation/networking/ip-sysctl.txt	Thu Dec 13 09:40:03 2001
@@ -309,13 +309,20 @@
 	ICMP ECHO requests sent to it or just those to broadcast/multicast
 	addresses, respectively.
 
-icmp_destunreach_rate - INTEGER
-icmp_paramprob_rate - INTEGER
-icmp_timeexceed_rate - INTEGER
-icmp_echoreply_rate - INTEGER (not enabled per default)
-	Limit the maximal rates for sending ICMP packets to specific targets.
+icmp_ratelimit - INTEGER
+	Limit the maximal rates for sending ICMP packets whose type matches
+	icmp_ratemask (see below) to specific targets.
 	0 to disable any limiting, otherwise the maximal rate in jiffies(1)
-	See the source for more information.
+	Default: 1
+
+icmp_ratemask - INTEGER
+	Mask made of ICMP types for which rates are being limited.
+	Default: 6168
+	Note: 6168 = 0x1818 = 1<<ICMP_DEST_UNREACH + 1<<ICMP_SOURCE_QUENCH +
+	      1<<ICMP_TIME_EXCEEDED + 1<<ICMP_PARAMETERPROB, which means
+	      dest unreachable (3), source quench (4), time exceeded (11)
+	      and parameter problem (12) ICMP packets are rate limited
+	      (check values in icmp.h)
 
 icmp_ignore_bogus_error_responses - BOOLEAN
 	Some routers violate RFC 1122 by sending bogus responses to broadcast
diff -urN linux-2.4.17-pre8/net/ipv4/icmp.c linux/net/ipv4/icmp.c
--- linux-2.4.17-pre8/net/ipv4/icmp.c	Wed Nov  7 23:39:36 2001
+++ linux/net/ipv4/icmp.c	Thu Dec 13 09:40:03 2001
@@ -154,8 +154,8 @@
  * 	it's bit position.
  *
  *	default: 
- *	dest unreachable (0x03), source quench (0x04),
- *	time exceeded (0x11), parameter problem (0x12)
+ *	dest unreachable (3), source quench (4),
+ *	time exceeded (11), parameter problem (12)
  */
 
 int sysctl_icmp_ratelimit = 1*HZ;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] small doc update for /proc/sys/net/ipv4/icmp_rate{mask,limit}
  2001-12-13  0:37 ` David S. Miller
  2001-12-13  8:57   ` Pierre Lombard
@ 2001-12-13  8:59   ` David S. Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David S. Miller @ 2001-12-13  8:59 UTC (permalink / raw)
  To: pierre.lombard; +Cc: linux-kernel

   From: Pierre Lombard <pierre.lombard@imag.fr>
   Date: Thu, 13 Dec 2001 09:57:49 +0100
   
   A fresh & unedited version against a vanilla 2.4.17-pre8 is
   text-attached.

Applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-12-13  9:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-12 12:27 [PATCH] small doc update for /proc/sys/net/ipv4/icmp_rate{mask,limit} Pierre Lombard
2001-12-13  0:37 ` David S. Miller
2001-12-13  8:57   ` Pierre Lombard
2001-12-13  8:59   ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).