VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / net / ipv6 / icmp.c
index cfecd15..4faafff 100644 (file)
@@ -55,7 +55,7 @@
 #include <net/sock.h>
 
 #include <net/ipv6.h>
-#include <net/checksum.h>
+#include <net/ip6_checksum.h>
 #include <net/protocol.h>
 #include <net/raw.h>
 #include <net/rawv6.h>
@@ -174,7 +174,7 @@ static inline int icmpv6_xrlim_allow(struct sock *sk, int type,
         */
        dst = ip6_route_output(sk, fl);
        if (dst->error) {
-               IP6_INC_STATS(OutNoRoutes);
+               IP6_INC_STATS(IPSTATS_MIB_OUTNOROUTES);
        } else if (dst->dev && (dst->dev->flags&IFF_LOOPBACK)) {
                res = 1;
        } else {
@@ -404,8 +404,8 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
        err = icmpv6_push_pending_frames(sk, &fl, &tmp_hdr, len + sizeof(struct icmp6hdr));
 
        if (type >= ICMPV6_DEST_UNREACH && type <= ICMPV6_PARAMPROB)
-               ICMP6_INC_STATS_OFFSET_BH(idev, Icmp6OutDestUnreachs, type - ICMPV6_DEST_UNREACH);
-       ICMP6_INC_STATS_BH(idev, Icmp6OutMsgs);
+               ICMP6_INC_STATS_OFFSET_BH(idev, ICMP6_MIB_OUTDESTUNREACHS, type - ICMPV6_DEST_UNREACH);
+       ICMP6_INC_STATS_BH(idev, ICMP6_MIB_OUTMSGS);
 
 out_put:
        if (likely(idev != NULL))
@@ -480,8 +480,8 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
        }
        err = icmpv6_push_pending_frames(sk, &fl, &tmp_hdr, skb->len + sizeof(struct icmp6hdr));
 
-        ICMP6_INC_STATS_BH(idev, Icmp6OutEchoReplies);
-        ICMP6_INC_STATS_BH(idev, Icmp6OutMsgs);
+        ICMP6_INC_STATS_BH(idev, ICMP6_MIB_OUTECHOREPLIES);
+        ICMP6_INC_STATS_BH(idev, ICMP6_MIB_OUTMSGS);
 
 out_put: 
        if (likely(idev != NULL))
@@ -560,7 +560,7 @@ static int icmpv6_rcv(struct sk_buff **pskb, unsigned int *nhoffp)
        struct icmp6hdr *hdr;
        int type;
 
-       ICMP6_INC_STATS_BH(idev, Icmp6InMsgs);
+       ICMP6_INC_STATS_BH(idev, ICMP6_MIB_INMSGS);
 
        saddr = &skb->nh.ipv6h->saddr;
        daddr = &skb->nh.ipv6h->daddr;
@@ -593,9 +593,9 @@ static int icmpv6_rcv(struct sk_buff **pskb, unsigned int *nhoffp)
        type = hdr->icmp6_type;
 
        if (type >= ICMPV6_DEST_UNREACH && type <= ICMPV6_PARAMPROB)
-               ICMP6_INC_STATS_OFFSET_BH(idev, Icmp6InDestUnreachs, type - ICMPV6_DEST_UNREACH);
+               ICMP6_INC_STATS_OFFSET_BH(idev, ICMP6_MIB_INDESTUNREACHS, type - ICMPV6_DEST_UNREACH);
        else if (type >= ICMPV6_ECHO_REQUEST && type <= NDISC_REDIRECT)
-               ICMP6_INC_STATS_OFFSET_BH(idev, Icmp6InEchos, type - ICMPV6_ECHO_REQUEST);
+               ICMP6_INC_STATS_OFFSET_BH(idev, ICMP6_MIB_INECHOS, type - ICMPV6_ECHO_REQUEST);
 
        switch (type) {
        case ICMPV6_ECHO_REQUEST:
@@ -646,7 +646,13 @@ static int icmpv6_rcv(struct sk_buff **pskb, unsigned int *nhoffp)
                break;
 
        case ICMPV6_MGM_REDUCTION:
+       case ICMPV6_NI_QUERY:
+       case ICMPV6_NI_REPLY:
        case ICMPV6_MLD2_REPORT:
+       case ICMPV6_DHAAD_REQUEST:
+       case ICMPV6_DHAAD_REPLY:
+       case ICMPV6_MOBILE_PREFIX_SOL:
+       case ICMPV6_MOBILE_PREFIX_ADV:
                break;
 
        default:
@@ -668,7 +674,7 @@ static int icmpv6_rcv(struct sk_buff **pskb, unsigned int *nhoffp)
        return 0;
 
 discard_it:
-       ICMP6_INC_STATS_BH(idev, Icmp6InErrors);
+       ICMP6_INC_STATS_BH(idev, ICMP6_MIB_INERRORS);
        kfree_skb(skb);
        return 0;
 }