]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[NETFILTER]: nf_conntrack: Increment error count on parsing IPv4 header
authorYasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Sun, 15 Jul 2007 03:44:23 +0000 (20:44 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 15 Jul 2007 03:44:23 +0000 (20:44 -0700)
Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
net/netfilter/nf_conntrack_core.c

index 89e20ab494b8ca5246587596b25d5fb04c8fa37f..b5c4bb54691e7b50945cebfbf17e5bce8bbd7be4 100644 (file)
@@ -131,8 +131,6 @@ ipv6_prepare(struct sk_buff **pskb, unsigned int hooknum, unsigned int *dataoff,
         */
        if ((protoff < 0) || (protoff > (*pskb)->len)) {
                pr_debug("ip6_conntrack_core: can't find proto in pkt\n");
-               NF_CT_STAT_INC_ATOMIC(error);
-               NF_CT_STAT_INC_ATOMIC(invalid);
                return -NF_ACCEPT;
        }
 
index 3d1411012a2c496d5bdf98649321e63074e63e60..b730413738a60da74f234965764881c59eddf9cf 100644 (file)
@@ -625,6 +625,8 @@ nf_conntrack_in(int pf, unsigned int hooknum, struct sk_buff **pskb)
 
        if ((ret = l3proto->prepare(pskb, hooknum, &dataoff, &protonum)) <= 0) {
                pr_debug("not prepared to track yet or error occured\n");
+               NF_CT_STAT_INC_ATOMIC(error);
+               NF_CT_STAT_INC_ATOMIC(invalid);
                return -ret;
        }