From: Rafał Miłecki Date: Mon, 28 Oct 2019 07:39:02 +0000 (+0100) Subject: netfilter: fix NAT packaging with kernels 5.2+ X-Git-Tag: v21.02.0-rc1~4691 X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=d22c1755fcb45a7509629c3f769a2da204d6b0b0;p=openwrt%2Fstaging%2Fhauke.git netfilter: fix NAT packaging with kernels 5.2+ It's related to the upstream kernel commit adf82accc5f5 ("netfilter: x_tables: merge ip and ipv6 masquerade modules"). Signed-off-by: Rafał Miłecki --- diff --git a/include/netfilter.mk b/include/netfilter.mk index 179d4ed7b9..009f3502ee 100644 --- a/include/netfilter.mk +++ b/include/netfilter.mk @@ -202,7 +202,8 @@ $(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT6,CONFIG_IP6_NF_TARGET_NPT, $(P_V6)i $(eval $(if $(NF_KMOD),,$(call nf_add,IPT_NAT,CONFIG_NF_NAT, ipt_SNAT ipt_DNAT))) $(eval $(if $(NF_KMOD),,$(call nf_add,IPT_NAT6,CONFIG_IP6_NF_TARGET_NPT, ip6t_DNPT ip6t_SNPT))) -$(eval $(call nf_add,IPT_NAT,CONFIG_IP_NF_TARGET_MASQUERADE, $(P_V4)ipt_MASQUERADE)) +$(eval $(call nf_add,IPT_NAT,CONFIG_IP_NF_TARGET_MASQUERADE, $(P_V4)ipt_MASQUERADE, lt 5.2)) +$(eval $(call nf_add,IPT_NAT,CONFIG_IP_NF_TARGET_MASQUERADE, $(P_XT)xt_MASQUERADE, ge 5.2)) $(eval $(call nf_add,IPT_NAT,CONFIG_IP_NF_TARGET_REDIRECT, $(P_XT)xt_REDIRECT))