--- zzzz-none-000/linux-4.4.271/net/netfilter/nf_conntrack_netlink.c 2021-06-03 06:22:09.000000000 +0000 +++ dakota-7530ac-750/linux-4.4.271/net/netfilter/nf_conntrack_netlink.c 2023-01-11 09:25:44.000000000 +0000 @@ -28,6 +28,9 @@ #include #include #include +#ifdef CONFIG_NF_CONNTRACK_CHAIN_EVENTS +#include +#endif #include #include @@ -634,19 +637,27 @@ } #ifdef CONFIG_NF_CONNTRACK_EVENTS +#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; /* ignore our fake conntrack entry */ if (nf_ct_is_untracked(ct)) @@ -3292,9 +3303,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,