Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=60e5c166413f17d5ef00b4c1f398dbd44291309a
Commit:     60e5c166413f17d5ef00b4c1f398dbd44291309a
Parent:     75559c167bddc1254db5bcff032ad5eed8bd6f4a
Author:     Mitsuru Chinen <[EMAIL PROTECTED]>
AuthorDate: Wed Apr 4 23:54:59 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Apr 4 23:54:59 2007 -0700

    [IPv6]: Exclude truncated packets from InHdrErrors statistics
    
    Incoming trancated packets are counted as not only InTruncatedPkts but
    also InHdrErrors. They should be counted as InTruncatedPkts only.
    
    Signed-off-by: Mitsuru Chinen <[EMAIL PROTECTED]>
    Acked-by: YOSHIFUJI Hideaki <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/ipv6/ip6_input.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c
index 11bfc7c..61e7a6c 100644
--- a/net/ipv6/ip6_input.c
+++ b/net/ipv6/ip6_input.c
@@ -108,8 +108,10 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, 
struct packet_type *pt
 
        /* pkt_len may be zero if Jumbo payload option is present */
        if (pkt_len || hdr->nexthdr != NEXTHDR_HOP) {
-               if (pkt_len + sizeof(struct ipv6hdr) > skb->len)
-                       goto truncated;
+               if (pkt_len + sizeof(struct ipv6hdr) > skb->len) {
+                       IP6_INC_STATS_BH(idev, IPSTATS_MIB_INTRUNCATEDPKTS);
+                       goto drop;
+               }
                if (pskb_trim_rcsum(skb, pkt_len + sizeof(struct ipv6hdr))) {
                        IP6_INC_STATS_BH(idev, IPSTATS_MIB_INHDRERRORS);
                        goto drop;
@@ -128,8 +130,6 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, 
struct packet_type *pt
        rcu_read_unlock();
 
        return NF_HOOK(PF_INET6,NF_IP6_PRE_ROUTING, skb, dev, NULL, 
ip6_rcv_finish);
-truncated:
-       IP6_INC_STATS_BH(idev, IPSTATS_MIB_INTRUNCATEDPKTS);
 err:
        IP6_INC_STATS_BH(idev, IPSTATS_MIB_INHDRERRORS);
 drop:
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to