kernel: Include xt_MASQUERADE for kernel 5.2 and later
authorKoen Vandeputte <koen.vandeputte@ncentric.com>
Sun, 23 Feb 2020 14:30:37 +0000 (15:30 +0100)
committerKoen Vandeputte <koen.vandeputte@ncentric.com>
Fri, 28 Feb 2020 16:50:46 +0000 (17:50 +0100)
Instead of ip6t_MASQUERADE, include xt_MASQUERADE on kernel >= 5.2.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
include/netfilter.mk

index c62b9a827f114af69700ea09edb7abd92164686c..306975c31b57d5c4b9f8808fb5a51bc667a909cd 100644 (file)
@@ -195,7 +195,8 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NF_NAT6,CONFIG_NF_NAT_MASQUERADE_IPV6, $(P_
 $(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT,CONFIG_NETFILTER_XT_NAT, $(P_XT)xt_nat),))
 $(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT,CONFIG_IP_NF_NAT, $(P_V4)iptable_nat),))
 $(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT6,CONFIG_IP6_NF_NAT, $(P_V6)ip6table_nat),))
-$(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT6,CONFIG_IP6_NF_TARGET_MASQUERADE, $(P_V6)ip6t_MASQUERADE),))
+$(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT6,CONFIG_IP6_NF_TARGET_MASQUERADE, $(P_V6)ip6t_MASQUERADE, lt 5.2),))
+$(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT6,CONFIG_IP6_NF_TARGET_MASQUERADE, $(P_XT)xt_MASQUERADE, ge 5.2),))
 $(eval $(if $(NF_KMOD),$(call nf_add,IPT_NAT6,CONFIG_IP6_NF_TARGET_NPT, $(P_V6)ip6t_NPT),))
 
 # userland only