Unverified Commit f63e9bf3 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!11344 netfilter: ctnetlink: use helper function to calculate expect ID

parents 36798fc2 f91334b7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3385,7 +3385,8 @@ static int ctnetlink_del_expect(struct net *net, struct sock *ctnl,

		if (cda[CTA_EXPECT_ID]) {
			__be32 id = nla_get_be32(cda[CTA_EXPECT_ID]);
			if (ntohl(id) != (u32)(unsigned long)exp) {

			if (id != nf_expect_get_id(exp)) {
				nf_ct_expect_put(exp);
				return -ENOENT;
			}