From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH 1/3] icmp: fix units for ratelimit
Date: Tue, 1 Jul 2008 15:38:20 -0700 [thread overview]
Message-ID: <20080701153820.235faa72@extreme> (raw)
Convert the sysctl values for icmp ratelimit to use milliseconds instead
of jiffies which is based on kernel configured HZ.
Internal kernel jiffies are not a proper unit for any userspace API.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
---
Patch against net-next-2.6
--- a/Documentation/networking/ip-sysctl.txt 2008-07-01 14:11:39.000000000 -0700
+++ b/Documentation/networking/ip-sysctl.txt 2008-07-01 14:14:15.000000000 -0700
@@ -548,8 +548,9 @@ icmp_echo_ignore_broadcasts - BOOLEAN
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)
- Default: 100
+ 0 to disable any limiting,
+ otherwise the minimal space between responses in milliseconds.
+ Default: 1000
icmp_ratemask - INTEGER
Mask made of ICMP types for which rates are being limited.
@@ -1027,8 +1028,9 @@ max_addresses - INTEGER
icmp/*:
ratelimit - INTEGER
Limit the maximal rates for sending ICMPv6 packets.
- 0 to disable any limiting, otherwise the maximal rate in jiffies(1)
- Default: 100
+ 0 to disable any limiting,
+ otherwise the minimal space between responses in milliseconds.
+ Default: 1000
IPv6 Update by:
--- a/net/ipv4/sysctl_net_ipv4.c 2008-07-01 14:14:34.000000000 -0700
+++ b/net/ipv4/sysctl_net_ipv4.c 2008-07-01 14:17:10.000000000 -0700
@@ -793,7 +793,8 @@ static struct ctl_table ipv4_net_table[]
.data = &init_net.ipv4.sysctl_icmp_ratelimit,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = &proc_dointvec
+ .proc_handler = &proc_dointvec_ms_jiffies,
+ .strategy = &sysctl_ms_jiffies
},
{
.ctl_name = NET_IPV4_ICMP_RATEMASK,
--- a/net/ipv6/icmp.c 2008-07-01 14:15:37.000000000 -0700
+++ b/net/ipv6/icmp.c 2008-07-01 14:17:06.000000000 -0700
@@ -954,7 +954,8 @@ ctl_table ipv6_icmp_table_template[] = {
.data = &init_net.ipv6.sysctl.icmpv6_time,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = &proc_dointvec
+ .proc_handler = &proc_dointvec_ms_jiffies,
+ .strategy = &sysctl_ms_jiffies
},
{ .ctl_name = 0 },
};
next reply other threads:[~2008-07-01 22:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-01 22:38 Stephen Hemminger [this message]
2008-07-01 22:39 ` [PATCH 2/3] ipv4: fix sysctl documentation of time related values Stephen Hemminger
2008-07-01 22:43 ` [PATCH 3/3] ip: sysctl documentation cleanup Stephen Hemminger
2008-07-01 22:55 ` Randy.Dunlap
2008-07-01 23:13 ` Stephen Hemminger
2008-07-01 23:26 ` Karen Shaeffer
2008-07-01 23:32 ` Randy.Dunlap
2008-07-02 2:28 ` David Miller
2008-07-10 21:39 ` Stephen Hemminger
2008-07-10 21:44 ` Randy Dunlap
2008-07-10 23:51 ` David Miller
2008-07-02 0:23 ` [PATCH 2/3] ipv4: fix sysctl documentation of time related values David Miller
2008-07-02 2:29 ` [PATCH 1/3] icmp: fix units for ratelimit David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080701153820.235faa72@extreme \
--to=shemminger@vyatta.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).