aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/ah6.c3
-rw-r--r--net/ipv6/esp6.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c
index 4eaf55072b1b..d4b59ecb0b57 100644
--- a/net/ipv6/ah6.c
+++ b/net/ipv6/ah6.c
@@ -379,10 +379,9 @@ static int ah6_input(struct xfrm_state *x, struct sk_buff *skb)
379 err = ah_mac_digest(ahp, skb, ah->auth_data); 379 err = ah_mac_digest(ahp, skb, ah->auth_data);
380 if (err) 380 if (err)
381 goto free_out; 381 goto free_out;
382 err = -EINVAL;
383 if (memcmp(ahp->work_icv, auth_data, ahp->icv_trunc_len)) { 382 if (memcmp(ahp->work_icv, auth_data, ahp->icv_trunc_len)) {
384 LIMIT_NETDEBUG(KERN_WARNING "ipsec ah authentication error\n"); 383 LIMIT_NETDEBUG(KERN_WARNING "ipsec ah authentication error\n");
385 x->stats.integrity_failed++; 384 err = -EBADMSG;
386 goto free_out; 385 goto free_out;
387 } 386 }
388 } 387 }
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c
index 444053254676..096974ba6420 100644
--- a/net/ipv6/esp6.c
+++ b/net/ipv6/esp6.c
@@ -177,8 +177,7 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb)
177 BUG(); 177 BUG();
178 178
179 if (unlikely(memcmp(esp->auth.work_icv, sum, alen))) { 179 if (unlikely(memcmp(esp->auth.work_icv, sum, alen))) {
180 x->stats.integrity_failed++; 180 ret = -EBADMSG;
181 ret = -EINVAL;
182 goto out; 181 goto out;
183 } 182 }
184 } 183 }