[PATCH 5/7] netfilter.mk: add version conditional around nf_nat_redirect mod

Adrian Schmutzler mail at adrianschmutzler.de
Tue Oct 13 11:49:34 EDT 2020


Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org]
> On Behalf Of Yousong Zhou
> Sent: Dienstag, 13. Oktober 2020 14:31
> To: openwrt-devel at lists.openwrt.org; Tony Ambardar
> <itugrok at yahoo.com>
> Cc: Yousong Zhou <yszhou4tech at gmail.com>
> Subject: [PATCH 5/7] netfilter.mk: add version conditional around
> nf_nat_redirect mod
> 
> Kernel commit 1ac89d20150e ("netfilter: nat: merge nf_nat_redirect into
> nf_nat") made the redirect module part of the nat core and changed the
> CONFIG_NF_NAT_REDIRECT option to a boolean, without prompt, affecting
> kernel 4.18 onwards.  CONFIG_NF_NAT_REDIRECT now can only be selected
> by CONFIG_NFT_REDIR or NETFILTER_XT_TARGET_REDIRECT

We only support 4.19+ by now (4.14 has been dropped a while ago), so we can drop the "lt 4.18" part here.

Best

Adrian

> 
> Fixes: FS#2476
> Ref: https://bugs.openwrt.org/index.php?do=details&task_id=2476
> 
> Fixes: FS#2990 (partial)
> Ref: https://bugs.openwrt.org/index.php?do=details&task_id=2990
> 
> Signed-off-by: Tony Ambardar <itugrok at yahoo.com> [note that the option
> has no prompt and can only be selected by other kconfig options]
> Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
> ---
>  include/netfilter.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/netfilter.mk b/include/netfilter.mk index
> 3c217db106..e5ba3b366e 100644
> --- a/include/netfilter.mk
> +++ b/include/netfilter.mk
> @@ -184,7 +184,7 @@ $(eval $(call
> nf_add,IPT_IPV6_EXTRA,CONFIG_IP6_NF_MATCH_RT, $(P_V6)ip6t_rt))
> 
>  # kernel only
>  $(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT,
> $(P_XT)nf_nat),)) -$(eval $(if $(NF_KMOD),$(call
> nf_add,NF_NAT,CONFIG_NF_NAT_REDIRECT, $(P_XT)nf_nat_redirect),))
> +$(eval $(if $(NF_KMOD),$(call
> nf_add,NF_NAT,CONFIG_NF_NAT_REDIRECT,
> +$(P_XT)nf_nat_redirect, lt 4.18),))
>  $(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT,CONFIG_NF_NAT_IPV4,
> $(P_V4)nf_nat_ipv4, lt 5.1)))  $(eval $(if $(NF_KMOD),$(call
> nf_add,NF_NAT6,CONFIG_NF_NAT_IPV6, $(P_V6)nf_nat_ipv6, lt 5.1)))
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20201013/c939c57b/attachment.sig>


More information about the openwrt-devel mailing list