Skip to content

Commit a5ebcbd

Browse files
Zhang Changzhongkuba-moo
authored andcommitted
ah6: fix error return code in ah6_input()
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Zhang Changzhong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent df8d85d commit a5ebcbd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/ipv6/ah6.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,8 @@ static int ah6_input(struct xfrm_state *x, struct sk_buff *skb)
588588
memcpy(auth_data, ah->auth_data, ahp->icv_trunc_len);
589589
memset(ah->auth_data, 0, ahp->icv_trunc_len);
590590

591-
if (ipv6_clear_mutable_options(ip6h, hdr_len, XFRM_POLICY_IN))
591+
err = ipv6_clear_mutable_options(ip6h, hdr_len, XFRM_POLICY_IN);
592+
if (err)
592593
goto out_free;
593594

594595
ip6h->priority = 0;

0 commit comments

Comments
 (0)