From: Jo-Philipp Wich Date: Mon, 18 Oct 2010 20:39:07 +0000 (+0000) Subject: [include] netfilter: workaround a userspace/kernel mismatch on Linux 2.6.35 and later X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=f54421c7e9bf38d1b7eb4e5e5732956c85044468 [include] netfilter: workaround a userspace/kernel mismatch on Linux 2.6.35 and later SVN-Revision: 23521 --- diff --git a/include/netfilter.mk b/include/netfilter.mk index 5ec7df6bf5..35f46de86e 100644 --- a/include/netfilter.mk +++ b/include/netfilter.mk @@ -135,8 +135,13 @@ $(eval $(call nf_add,IPT_IPOPT,CONFIG_NETFILTER_XT_TARGET_CLASSIFY, $(P_XT)xt_CL $(eval $(call nf_add,IPT_IPOPT,CONFIG_IP_NF_MATCH_DSCP, $(P_V4)ipt_dscp)) $(eval $(call nf_add,IPT_IPOPT,CONFIG_IP_NF_TARGET_ECN, $(P_V4)ipt_ECN)) $(eval $(call nf_add,IPT_IPOPT,CONFIG_IP_NF_TARGET_MARK, $(P_V4)ipt_MARK)) + +# XXX: 2.6.35+ has xt_MARK.ko merged into xt_mark.ko, userspace is still separate ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,2.6.35)),1) - $(eval $(call nf_add,IPT_IPOPT,CONFIG_NETFILTER_XT_TARGET_MARK, $(P_XT)xt_mark)) + # kernel: xt_mark.ko + $(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPOPT,CONFIG_NETFILTER_XT_TARGET_MARK, $(P_XT)xt_mark))) + # userland: xt_MARK.so + $(eval $(if $(NF_KMOD),,$(call nf_add,IPT_IPOPT,CONFIG_NETFILTER_XT_TARGET_MARK, $(P_XT)xt_MARK))) else $(eval $(call nf_add,IPT_IPOPT,CONFIG_NETFILTER_XT_TARGET_MARK, $(P_XT)xt_MARK)) endif