X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fipv6%2Ficmp.c;h=4faafff32e7bc710c0dd2647dcef8fa107f708d0;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=cfecd15d9b5c68d528da43c464c2ff3d6fe0da69;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index cfecd15d9..4faafff32 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c @@ -55,7 +55,7 @@ #include #include -#include +#include #include #include #include @@ -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; }