diff options
Diffstat (limited to 'net/ipv6/icmp.c')
-rw-r--r-- | net/ipv6/icmp.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index f23ebbec0631..3330a4bd6157 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/skbuff.h> | 40 | #include <linux/skbuff.h> |
41 | #include <linux/init.h> | 41 | #include <linux/init.h> |
42 | #include <linux/netfilter.h> | 42 | #include <linux/netfilter.h> |
43 | #include <linux/slab.h> | ||
43 | 44 | ||
44 | #ifdef CONFIG_SYSCTL | 45 | #ifdef CONFIG_SYSCTL |
45 | #include <linux/sysctl.h> | 46 | #include <linux/sysctl.h> |
@@ -67,11 +68,6 @@ | |||
67 | #include <asm/uaccess.h> | 68 | #include <asm/uaccess.h> |
68 | #include <asm/system.h> | 69 | #include <asm/system.h> |
69 | 70 | ||
70 | DEFINE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics) __read_mostly; | ||
71 | EXPORT_SYMBOL(icmpv6_statistics); | ||
72 | DEFINE_SNMP_STAT(struct icmpv6msg_mib, icmpv6msg_statistics) __read_mostly; | ||
73 | EXPORT_SYMBOL(icmpv6msg_statistics); | ||
74 | |||
75 | /* | 71 | /* |
76 | * The ICMP socket(s). This is the most convenient way to flow control | 72 | * The ICMP socket(s). This is the most convenient way to flow control |
77 | * our ICMP output as well as maintain a clean interface throughout | 73 | * our ICMP output as well as maintain a clean interface throughout |
@@ -119,7 +115,7 @@ static __inline__ void icmpv6_xmit_unlock(struct sock *sk) | |||
119 | */ | 115 | */ |
120 | void icmpv6_param_prob(struct sk_buff *skb, u8 code, int pos) | 116 | void icmpv6_param_prob(struct sk_buff *skb, u8 code, int pos) |
121 | { | 117 | { |
122 | icmpv6_send(skb, ICMPV6_PARAMPROB, code, pos, skb->dev); | 118 | icmpv6_send(skb, ICMPV6_PARAMPROB, code, pos); |
123 | kfree_skb(skb); | 119 | kfree_skb(skb); |
124 | } | 120 | } |
125 | 121 | ||
@@ -305,8 +301,7 @@ static inline void mip6_addr_swap(struct sk_buff *skb) {} | |||
305 | /* | 301 | /* |
306 | * Send an ICMP message in response to a packet in error | 302 | * Send an ICMP message in response to a packet in error |
307 | */ | 303 | */ |
308 | void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info, | 304 | void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info) |
309 | struct net_device *dev) | ||
310 | { | 305 | { |
311 | struct net *net = dev_net(skb->dev); | 306 | struct net *net = dev_net(skb->dev); |
312 | struct inet6_dev *idev = NULL; | 307 | struct inet6_dev *idev = NULL; |
@@ -942,18 +937,16 @@ EXPORT_SYMBOL(icmpv6_err_convert); | |||
942 | #ifdef CONFIG_SYSCTL | 937 | #ifdef CONFIG_SYSCTL |
943 | ctl_table ipv6_icmp_table_template[] = { | 938 | ctl_table ipv6_icmp_table_template[] = { |
944 | { | 939 | { |
945 | .ctl_name = NET_IPV6_ICMP_RATELIMIT, | ||
946 | .procname = "ratelimit", | 940 | .procname = "ratelimit", |
947 | .data = &init_net.ipv6.sysctl.icmpv6_time, | 941 | .data = &init_net.ipv6.sysctl.icmpv6_time, |
948 | .maxlen = sizeof(int), | 942 | .maxlen = sizeof(int), |
949 | .mode = 0644, | 943 | .mode = 0644, |
950 | .proc_handler = proc_dointvec_ms_jiffies, | 944 | .proc_handler = proc_dointvec_ms_jiffies, |
951 | .strategy = sysctl_ms_jiffies | ||
952 | }, | 945 | }, |
953 | { .ctl_name = 0 }, | 946 | { }, |
954 | }; | 947 | }; |
955 | 948 | ||
956 | struct ctl_table *ipv6_icmp_sysctl_init(struct net *net) | 949 | struct ctl_table * __net_init ipv6_icmp_sysctl_init(struct net *net) |
957 | { | 950 | { |
958 | struct ctl_table *table; | 951 | struct ctl_table *table; |
959 | 952 | ||