Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <hulkci@huawei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Link: https://lore.kernel.org/r/1605581105-35295-1-git-send-email-zhangchangzhong@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Zhang Changzhong and committed by
Jakub Kicinski
a5ebcbdf df8d85d8

+2 -1
+2 -1
net/ipv6/ah6.c
··· 588 588 memcpy(auth_data, ah->auth_data, ahp->icv_trunc_len); 589 589 memset(ah->auth_data, 0, ahp->icv_trunc_len); 590 590 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) 592 593 goto out_free; 593 594 594 595 ip6h->priority = 0;