drm/radeon/kms/evergreen: set accel_enabled
[safe/jmp/linux-2.6] / net / ipv6 / icmp.c
index 4ae661b..ce79929 100644 (file)
@@ -40,6 +40,7 @@
 #include <linux/skbuff.h>
 #include <linux/init.h>
 #include <linux/netfilter.h>
+#include <linux/slab.h>
 
 #ifdef CONFIG_SYSCTL
 #include <linux/sysctl.h>
 #include <asm/uaccess.h>
 #include <asm/system.h>
 
-DEFINE_SNMP_STAT(struct icmpv6_mib, icmpv6_statistics) __read_mostly;
-EXPORT_SYMBOL(icmpv6_statistics);
-DEFINE_SNMP_STAT(struct icmpv6msg_mib, icmpv6msg_statistics) __read_mostly;
-EXPORT_SYMBOL(icmpv6msg_statistics);
-
 /*
  *     The ICMP socket(s). This is the most convenient way to flow control
  *     our ICMP output as well as maintain a clean interface throughout
@@ -119,7 +115,7 @@ static __inline__ void icmpv6_xmit_unlock(struct sock *sk)
  */
 void icmpv6_param_prob(struct sk_buff *skb, u8 code, int pos)
 {
-       icmpv6_send(skb, ICMPV6_PARAMPROB, code, pos, skb->dev);
+       icmpv6_send(skb, ICMPV6_PARAMPROB, code, pos);
        kfree_skb(skb);
 }
 
@@ -305,8 +301,7 @@ static inline void mip6_addr_swap(struct sk_buff *skb) {}
 /*
  *     Send an ICMP message in response to a packet in error
  */
-void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info,
-                struct net_device *dev)
+void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info)
 {
        struct net *net = dev_net(skb->dev);
        struct inet6_dev *idev = NULL;
@@ -486,8 +481,9 @@ route_done:
                              len + sizeof(struct icmp6hdr),
                              sizeof(struct icmp6hdr), hlimit,
                              np->tclass, NULL, &fl, (struct rt6_info*)dst,
-                             MSG_DONTWAIT);
+                             MSG_DONTWAIT, np->dontfrag);
        if (err) {
+               ICMP6_INC_STATS_BH(net, idev, ICMP6_MIB_OUTMSGS);
                ip6_flush_pending_frames(sk);
                goto out_put;
        }
@@ -565,9 +561,11 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
 
        err = ip6_append_data(sk, icmpv6_getfrag, &msg, skb->len + sizeof(struct icmp6hdr),
                                sizeof(struct icmp6hdr), hlimit, np->tclass, NULL, &fl,
-                               (struct rt6_info*)dst, MSG_DONTWAIT);
+                               (struct rt6_info*)dst, MSG_DONTWAIT,
+                               np->dontfrag);
 
        if (err) {
+               ICMP6_INC_STATS_BH(net, idev, ICMP6_MIB_OUTMSGS);
                ip6_flush_pending_frames(sk);
                goto out_put;
        }
@@ -951,7 +949,7 @@ ctl_table ipv6_icmp_table_template[] = {
        { },
 };
 
-struct ctl_table *ipv6_icmp_sysctl_init(struct net *net)
+struct ctl_table * __net_init ipv6_icmp_sysctl_init(struct net *net)
 {
        struct ctl_table *table;