]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv6/ah6.c
[IPSEC]: Move integrity stat collection into xfrm_input
[linux-2.6-omap-h63xx.git] / net / ipv6 / ah6.c
index 4eaf55072b1b05ff7c52537acb01eead7bd761f4..d4b59ecb0b57853b6ad03598c7f0768c0a0e9400 100644 (file)
@@ -379,10 +379,9 @@ static int ah6_input(struct xfrm_state *x, struct sk_buff *skb)
                err = ah_mac_digest(ahp, skb, ah->auth_data);
                if (err)
                        goto free_out;
-               err = -EINVAL;
                if (memcmp(ahp->work_icv, auth_data, ahp->icv_trunc_len)) {
                        LIMIT_NETDEBUG(KERN_WARNING "ipsec ah authentication error\n");
-                       x->stats.integrity_failed++;
+                       err = -EBADMSG;
                        goto free_out;
                }
        }