summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-07-01 19:29:07 -0700
committerDavid S. Miller <davem@davemloft.net>2008-07-01 19:29:07 -0700
commit6dbf4bcac98bbc76ef425b3a2b4169f31199f6c7 (patch)
tree3ec9383233cdbebcd26a0ab1e7f666ff8cc03b5f /net
parent28f49d8fec19833672a6a813bfde0068fee50bc9 (diff)
downloadop-kernel-dev-6dbf4bcac98bbc76ef425b3a2b4169f31199f6c7.zip
op-kernel-dev-6dbf4bcac98bbc76ef425b3a2b4169f31199f6c7.tar.gz
icmp: fix units for ratelimit
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/sysctl_net_ipv4.c3
-rw-r--r--net/ipv6/icmp.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index 9016070..14ef202 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -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,
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 399d41f..abedf95 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -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 },
};
OpenPOWER on IntegriCloud