Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78637
b: refs/heads/master
c: 9dd3245
h: refs/heads/master
i:
  78635: fbfd037
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Jan 28, 2008
1 parent c2359ea commit 17c0c20
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0883ae0e5599656b5f3b0e9ce474e01dee7dfee4
refs/heads/master: 9dd3245a2ac1834797191072705015e6a12f55bf
4 changes: 1 addition & 3 deletions trunk/net/ipv4/ah4.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,8 @@ static int ah_input(struct xfrm_state *x, struct sk_buff *skb)
err = ah_mac_digest(ahp, skb, ah->auth_data);
if (err)
goto unlock;
if (memcmp(ahp->work_icv, auth_data, ahp->icv_trunc_len)) {
xfrm_audit_state_icvfail(x, skb, IPPROTO_AH);
if (memcmp(ahp->work_icv, auth_data, ahp->icv_trunc_len))
err = -EBADMSG;
}
}
unlock:
spin_unlock(&x->lock);
Expand Down
1 change: 0 additions & 1 deletion trunk/net/ipv4/esp4.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ static int esp_input(struct xfrm_state *x, struct sk_buff *skb)
BUG();

if (unlikely(memcmp(esp->auth.work_icv, sum, alen))) {
xfrm_audit_state_icvfail(x, skb, IPPROTO_ESP);
err = -EBADMSG;
goto unlock;
}
Expand Down
4 changes: 1 addition & 3 deletions trunk/net/ipv6/ah6.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,8 @@ static int ah6_input(struct xfrm_state *x, struct sk_buff *skb)
err = ah_mac_digest(ahp, skb, ah->auth_data);
if (err)
goto unlock;
if (memcmp(ahp->work_icv, auth_data, ahp->icv_trunc_len)) {
xfrm_audit_state_icvfail(x, skb, IPPROTO_AH);
if (memcmp(ahp->work_icv, auth_data, ahp->icv_trunc_len))
err = -EBADMSG;
}
}
unlock:
spin_unlock(&x->lock);
Expand Down
1 change: 0 additions & 1 deletion trunk/net/ipv6/esp6.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb)
BUG();

if (unlikely(memcmp(esp->auth.work_icv, sum, alen))) {
xfrm_audit_state_icvfail(x, skb, IPPROTO_ESP);
ret = -EBADMSG;
goto unlock;
}
Expand Down
5 changes: 4 additions & 1 deletion trunk/net/xfrm/xfrm_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,11 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type)
resume:
spin_lock(&x->lock);
if (nexthdr <= 0) {
if (nexthdr == -EBADMSG)
if (nexthdr == -EBADMSG) {
xfrm_audit_state_icvfail(x, skb,
x->type->proto);
x->stats.integrity_failed++;
}
XFRM_INC_STATS(LINUX_MIB_XFRMINSTATEPROTOERROR);
goto drop_unlock;
}
Expand Down

0 comments on commit 17c0c20

Please sign in to comment.