From ddb8f59b0a3ebb20508a1deedaa3b6b10ebfdd99 Mon Sep 17 00:00:00 2001 From: Ksawlii Date: Sun, 24 Nov 2024 00:23:56 +0100 Subject: [PATCH] Revert "netfilter: ctnetlink: use helper function to calculate expect ID" This reverts commit 42ea0c19139706bf7cb1a0b8e2f79d8e75cec421. --- net/netfilter/nf_conntrack_netlink.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index b55e87143..ceb7c988e 100755 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c @@ -3413,8 +3413,7 @@ 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 (id != nf_expect_get_id(exp)) { + if (ntohl(id) != (u32)(unsigned long)exp) { nf_ct_expect_put(exp); return -ENOENT; }