include: netfilter: prepare for kernel 4.19
authorMarko Ratkaj <marko.ratkaj@sartura.hr>
Wed, 19 Sep 2018 10:46:22 +0000 (12:46 +0200)
committerZoltan HERPAI <wigyori@uid0.hu>
Sat, 27 Oct 2018 23:02:53 +0000 (01:02 +0200)
With kernel 4.19 kernel module nf_conntrack_ipv6 no longer exists.
Instead, nf_conntrack module handles both IPv4 and IPv6 and it now
depends on nf_defrag_ipv6. This patch adds a version check to properly
handle this.

Signed-off-by: Marko Ratkaj <marko.ratkaj@sartura.hr>
include/netfilter.mk

index 510aa183ca1ed9ab38015ced17005d70a6f4f6fa..8b9cc831cfd4a1aeb7bd75c37ad284bc1de1c202 100644 (file)
@@ -156,8 +156,12 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NF_REJECT6,CONFIG_NF_REJECT_IPV6, $(P_V6)nf
 
 $(eval $(if $(NF_KMOD),$(call nf_add,NF_IPT6,CONFIG_IP6_NF_IPTABLES, $(P_V6)ip6_tables),))
 
+ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),lt,4.19.0)),1)
 $(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK6,CONFIG_NF_DEFRAG_IPV6, $(P_V6)nf_defrag_ipv6),))
 $(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK6,CONFIG_NF_CONNTRACK_IPV6, $(P_V6)nf_conntrack_ipv6),))
+else
+$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK,CONFIG_NF_DEFRAG_IPV6, $(P_V6)nf_defrag_ipv6),))
+endif
 
 $(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_FILTER, $(P_V6)ip6table_filter),))
 $(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_MANGLE, $(P_V6)ip6table_mangle),))
@@ -370,7 +374,9 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NFT_NAT6,CONFIG_NFT_MASQ_IPV6, $(P_V6)nft_m
 IPT_BUILTIN += $(NF_IPT-y) $(NF_IPT-m)
 IPT_BUILTIN += $(IPT_CORE-y) $(IPT_CORE-m)
 IPT_BUILTIN += $(NF_CONNTRACK-y)
+ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),lt,4.19.0)),1)
 IPT_BUILTIN += $(NF_CONNTRACK6-y)
+endif
 IPT_BUILTIN += $(IPT_CONNTRACK-y)
 IPT_BUILTIN += $(IPT_CONNTRACK_EXTRA-y)
 IPT_BUILTIN += $(IPT_EXTRA-y)