Hi Andreas, Andreas Beckmann wrote: > On 10/05/2023 16.32, Axel Beckert wrote: > > BUILD_EXCLUSIVE_* would be my currently slightly preferred approach as > > it's likely much simpler to implement and its impact is more clear, > > but not necessarily "smaller". Currently trying to figure out how it > > actually works. > > its a regex, like (untested): > # 6.1+ > BUILD_EXCLUSIVE_KERNEL="([7-9]|6\.[1-9]|6\.[1-9][0-9])\..*"
Thanks for the prompt and helpful reply! > > > this will be easier from bookworm+1 onwards). > > > > Ok. Well, I'll see. > > BUILD_EXCLUSIVE_KERNEL_MIN="6.1" Indeed easier. :-) > My preference would be to fix the module to build with the bullseye > kernel, Thanks for that comment as well. > Whenever that breaks again after an update to the kernel in > bullseye, it probably breaks the module in bullseye, too. Chances are there, but at least this breakage doesn't seem to have happend in Bullseye. Looking through upstream's commits, I suspect cherrypicking this upstream commit might fix it: https://github.com/aabc/ipt-netflow/commit/0901f028617acca350132a65293ab80a480bf233 commit 0901f028617acca350132a65293ab80a480bf233 Author: Vadim Fedorenko <vfedore...@novek.ru> Date: Mon Mar 28 21:59:10 2022 +0300 fix building on old kernels Link: https://github.com/aabc/ipt-netflow/pull/196 diff --git a/compat.h b/compat.h index 6be9d6b..847117f 100644 --- a/compat.h +++ b/compat.h @@ -782,7 +782,14 @@ struct module *find_module(const char *name) #endif #ifndef HAVE_NF_CT_EVENT_NOTIFIER_CT_EVENT +/* + * nat event callback parameter is constified in 5.15+ + * but it prevents module building with previous kernel versions + */ +# define NF_CT_EVENT struct nf_ct_event # define ct_event fcn +#else +# define NF_CT_EVENT const struct nf_ct_event #endif #endif /* COMPAT_NETFLOW_H */ diff --git a/ipt_NETFLOW.c b/ipt_NETFLOW.c index e042fe6..82805bc 100644 --- a/ipt_NETFLOW.c +++ b/ipt_NETFLOW.c @@ -4597,7 +4597,7 @@ static void rate_timer_calc( #ifdef CONFIG_NF_NAT_NEEDED #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) static struct nf_ct_event_notifier *saved_event_cb __read_mostly = NULL; -static int netflow_conntrack_event(const unsigned int events, const struct nf_ct_event *item) +static int netflow_conntrack_event(const unsigned int events, NF_CT_EVENT *item) #else static int netflow_conntrack_event(struct notifier_block *this, unsigned long events, void *ptr) #endif Regards, Axel -- ,''`. | Axel Beckert <a...@debian.org>, https://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5 `- | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE