--- zzzz-none-000/linux-5.4.213/net/netfilter/nf_conntrack_netlink.c 2022-09-15 10:04:56.000000000 +0000 +++ alder-5690pro-762/linux-5.4.213/net/netfilter/nf_conntrack_netlink.c 2024-08-14 09:02:13.000000000 +0000 @@ -28,6 +28,9 @@ #include #include #include +#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS +#include +#endif #include #include @@ -679,19 +682,27 @@ ; } +#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS +static int ctnetlink_conntrack_event(struct notifier_block *this, + unsigned long events, void *ptr) +#else static int ctnetlink_conntrack_event(unsigned int events, struct nf_ct_event *item) +#endif { const struct nf_conntrack_zone *zone; struct net *net; struct nlmsghdr *nlh; struct nfgenmsg *nfmsg; struct nlattr *nest_parms; - struct nf_conn *ct = item->ct; struct sk_buff *skb; unsigned int type; unsigned int flags = 0, group; int err; +#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS + struct nf_ct_event *item = (struct nf_ct_event *)ptr; +#endif + struct nf_conn *ct = item->ct; if (events & (1 << IPCT_DESTROY)) { type = IPCTNL_MSG_CT_DELETE; @@ -3508,9 +3519,15 @@ } #ifdef CONFIG_NF_CONNTRACK_EVENTS +#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS +static struct notifier_block ctnl_notifier = { + .notifier_call = ctnetlink_conntrack_event, +}; +#else static struct nf_ct_event_notifier ctnl_notifier = { .fcn = ctnetlink_conntrack_event, }; +#endif static struct nf_exp_event_notifier ctnl_notifier_exp = { .fcn = ctnetlink_expect_event,