From 167bb923aff9696269aaed8ed26bb6c4e2cbe8b9 Mon Sep 17 00:00:00 2001 From: nbd Date: Sun, 2 Apr 2006 21:38:15 +0000 Subject: fix the xt/ipt module path issue git-svn-id: svn://svn.openwrt.org/openwrt/trunk@3585 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- openwrt/target/linux/generic-2.6/modules.mk | 19 ++-- openwrt/target/linux/netfilter.mk | 152 +++++++++++++++------------- 2 files changed, 90 insertions(+), 81 deletions(-) (limited to 'openwrt/target') diff --git a/openwrt/target/linux/generic-2.6/modules.mk b/openwrt/target/linux/generic-2.6/modules.mk index d5b1867697..ab8a5f5d51 100644 --- a/openwrt/target/linux/generic-2.6/modules.mk +++ b/openwrt/target/linux/generic-2.6/modules.mk @@ -1,3 +1,4 @@ +NF_2_6:=1 include ../netfilter.mk # Networking @@ -65,39 +66,39 @@ $(eval $(call KMOD_template,IPTABLES_EXTRA,iptables-extra,\ ,,kmod-ipt-conntrack kmod-ipt-extra kmod-ipt-filter kmod-ipt-ipopt kmod-ipt-ipsec kmod-ipt-nat kmod-ipt-nat-extra kmod-ipt-queue kmod-ipt-ulogd)) $(eval $(call KMOD_template,IPT_CONNTRACK,ipt-conntrack,\ - $(foreach mod,$(IPT_CONNTRACK-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).ko) \ + $(foreach mod,$(IPT_CONNTRACK-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ )) $(eval $(call KMOD_template,IPT_EXTRA,ipt-extra,\ - $(foreach mod,$(IPT_EXTRA-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).ko) \ + $(foreach mod,$(IPT_EXTRA-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ )) $(eval $(call KMOD_template,IPT_FILTER,ipt-filter,\ - $(foreach mod,$(IPT_FILTER-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).ko) \ + $(foreach mod,$(IPT_FILTER-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ )) $(eval $(call KMOD_template,IPT_IPOPT,ipt-ipopt,\ - $(foreach mod,$(IPT_IPOPT-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).ko) \ + $(foreach mod,$(IPT_IPOPT-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ )) $(eval $(call KMOD_template,IPT_IPSEC,ipt-ipsec,\ - $(foreach mod,$(IPT_IPSEC-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).ko) \ + $(foreach mod,$(IPT_IPSEC-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ )) $(eval $(call KMOD_template,IPT_NAT,ipt-nat,\ - $(foreach mod,$(IPT_NAT-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).ko) \ + $(foreach mod,$(IPT_NAT-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ )) $(eval $(call KMOD_template,IPT_NAT_EXTRA,ipt-nat-extra,\ - $(foreach mod,$(IPT_NAT_EXTRA-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).ko) \ + $(foreach mod,$(IPT_NAT_EXTRA-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ ,,,40,$(IPT_NAT_EXTRA-m))) $(eval $(call KMOD_template,IPT_QUEUE,ipt-queue,\ - $(foreach mod,$(IPT_QUEUE-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).ko) \ + $(foreach mod,$(IPT_QUEUE-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ )) $(eval $(call KMOD_template,IPT_ULOG,ipt-ulog,\ - $(foreach mod,$(IPT_ULOG-m),$(MODULES_DIR)/kernel/net/ipv4/netfilter/$(mod).ko) \ + $(foreach mod,$(IPT_ULOG-m),$(MODULES_DIR)/kernel/net/$(mod).ko) \ )) $(eval $(call KMOD_template,IP6TABLES,ip6tables,\ diff --git a/openwrt/target/linux/netfilter.mk b/openwrt/target/linux/netfilter.mk index 5ad7ab1e16..26c467f8a0 100644 --- a/openwrt/target/linux/netfilter.mk +++ b/openwrt/target/linux/netfilter.mk @@ -1,98 +1,106 @@ # $Id: netfilter.mk 2411 2005-11-11 03:41:43Z nico $ +ifeq ($(NF_2_6),1) +P_V4:=ipv4/netfilter/ +P_XT:=netfilter/ +else +P_V4:= +P_XT:= +endif + IPT_CONNTRACK-m := -IPT_CONNTRACK-$(CONFIG_IP_NF_MATCH_CONNMARK) += ipt_connmark -IPT_CONNTRACK-$(CONFIG_IP_NF_TARGET_CONNMARK) += ipt_CONNMARK -IPT_CONNTRACK-$(CONFIG_IP_NF_MATCH_CONNTRACK) += ipt_conntrack -IPT_CONNTRACK-$(CONFIG_NETFILTER_XT_MATCH_CONNTRACK) += xt_conntrack -IPT_CONNTRACK-$(CONFIG_IP_NF_MATCH_HELPER) += ipt_helper -IPT_CONNTRACK-$(CONFIG_NETFILTER_XT_MATCH_HELPER) += xt_helper -IPT_CONNTRACK-$(CONFIG_IP_NF_MATCH_STATE) += ipt_state -IPT_CONNTRACK-$(CONFIG_NETFILTER_XT_MATCH_STATE) += xt_state +IPT_CONNTRACK-$(CONFIG_IP_NF_MATCH_CONNMARK) += $(P_V4)ipt_connmark +IPT_CONNTRACK-$(CONFIG_IP_NF_TARGET_CONNMARK) += $(P_V4)ipt_CONNMARK +IPT_CONNTRACK-$(CONFIG_IP_NF_MATCH_CONNTRACK) += $(P_V4)ipt_conntrack +IPT_CONNTRACK-$(CONFIG_IP_NF_MATCH_HELPER) += $(P_V4)ipt_helper +IPT_CONNTRACK-$(CONFIG_IP_NF_MATCH_STATE) += $(P_V4)ipt_state +IPT_CONNTRACK-$(CONFIG_NETFILTER_XT_MATCH_CONNTRACK) += $(P_XT)xt_conntrack +IPT_CONNTRACK-$(CONFIG_NETFILTER_XT_MATCH_HELPER) += $(P_XT)xt_helper +IPT_CONNTRACK-$(CONFIG_NETFILTER_XT_MATCH_STATE) += $(P_XT)xt_state IPT_EXTRA-m := -IPT_EXTRA-$(CONFIG_IP_NF_MATCH_CONDITION) += ipt_condition -IPT_EXTRA-$(CONFIG_IP_NF_MATCH_CONNBYTES) += ipt_connbytes -IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_CONNBYTES) += xt_connbytes -IPT_EXTRA-$(CONFIG_IP_NF_MATCH_LIMIT) += ipt_limit -IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_LIMIT) += xt_limit -IPT_EXTRA-$(CONFIG_IP_NF_TARGET_LOG) += ipt_LOG -IPT_EXTRA-$(CONFIG_IP_NF_MATCH_MULTIPORT) += ipt_multiport -IPT_EXTRA-$(CONFIG_IP_NF_MATCH_OWNER) += ipt_owner -IPT_EXTRA-$(CONFIG_IP_NF_MATCH_PHYSDEV) += ipt_physdev -IPT_EXTRA-$(CONFIG_IP_NF_MATCH_PKTTYPE) += ipt_pkttype -IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_PKTTYPE) += xt_pkttype -IPT_EXTRA-$(CONFIG_IP_NF_MATCH_QUOTA) += ipt_quota -IPT_EXTRA-$(CONFIG_IP_NF_MATCH_RECENT) += ipt_recent -IPT_EXTRA-$(CONFIG_IP_NF_TARGET_REJECT) += ipt_REJECT -IPT_EXTRA-$(CONFIG_IP_NF_MATCH_STRING) += ipt_string -IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_STRING) += xt_string +IPT_EXTRA-$(CONFIG_IP_NF_MATCH_CONDITION) += $(P_V4)ipt_condition +IPT_EXTRA-$(CONFIG_IP_NF_MATCH_CONNBYTES) += $(P_V4)ipt_connbytes +IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_CONNBYTES) += $(P_XT)xt_connbytes +IPT_EXTRA-$(CONFIG_IP_NF_MATCH_LIMIT) += $(P_V4)ipt_limit +IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_LIMIT) += $(P_XT)xt_limit +IPT_EXTRA-$(CONFIG_IP_NF_TARGET_LOG) += $(P_V4)ipt_LOG +IPT_EXTRA-$(CONFIG_IP_NF_MATCH_MULTIPORT) += $(P_V4)ipt_multiport +IPT_EXTRA-$(CONFIG_IP_NF_MATCH_OWNER) += $(P_V4)ipt_owner +IPT_EXTRA-$(CONFIG_IP_NF_MATCH_PHYSDEV) += $(P_V4)ipt_physdev +IPT_EXTRA-$(CONFIG_IP_NF_MATCH_PKTTYPE) += $(P_V4)ipt_pkttype +IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_PKTTYPE) += $(P_XT)xt_pkttype +IPT_EXTRA-$(CONFIG_IP_NF_MATCH_QUOTA) += $(P_V4)ipt_quota +IPT_EXTRA-$(CONFIG_IP_NF_MATCH_RECENT) += $(P_V4)ipt_recent +IPT_EXTRA-$(CONFIG_IP_NF_TARGET_REJECT) += $(P_V4)ipt_REJECT +IPT_EXTRA-$(CONFIG_IP_NF_MATCH_STRING) += $(P_V4)ipt_string +IPT_EXTRA-$(CONFIG_NETFILTER_XT_MATCH_STRING) += $(P_XT)xt_string IPT_FILTER-m := -IPT_FILTER-$(CONFIG_IP_NF_MATCH_IPP2P) += ipt_ipp2p -IPT_FILTER-$(CONFIG_IP_NF_MATCH_LAYER7) += ipt_layer7 +IPT_FILTER-$(CONFIG_IP_NF_MATCH_IPP2P) += $(P_V4)ipt_ipp2p +IPT_FILTER-$(CONFIG_IP_NF_MATCH_LAYER7) += $(P_V4)ipt_layer7 IPT_IMQ-m := -IPT_IMQ-$(CONFIG_IP_NF_TARGET_IMQ) += ipt_IMQ +IPT_IMQ-$(CONFIG_IP_NF_TARGET_IMQ) += $(P_V4)ipt_IMQ IPT_IPOPT-m := -IPT_IPOPT-$(CONFIG_IP_NF_MATCH_DSCP) += ipt_dscp -IPT_IPOPT-$(CONFIG_IP_NF_TARGET_DSCP) += ipt_DSCP -IPT_IPOPT-$(CONFIG_IP_NF_MATCH_ECN) += ipt_ecn -IPT_IPOPT-$(CONFIG_IP_NF_TARGET_ECN) += ipt_ECN -IPT_IPOPT-$(CONFIG_IP_NF_MATCH_LENGTH) += ipt_length -IPT_IPOPT-$(CONFIG_NETFILTER_XT_MATCH_LENGTH) += ipt_length -IPT_IPOPT-$(CONFIG_IP_NF_MATCH_MAC) += ipt_mac -IPT_IPOPT-$(CONFIG_NETFILTER_XT_MATCH_MAC) += ipt_mac -IPT_IPOPT-$(CONFIG_IP_NF_MATCH_MARK) += ipt_mark -IPT_IPOPT-$(CONFIG_NETFILTER_XT_MATCH_MARK) += ipt_mark -IPT_IPOPT-$(CONFIG_IP_NF_TARGET_MARK) += ipt_MARK -IPT_IPOPT-$(CONFIG_NETFILTER_XT_TARGET_MARK) += ipt_MARK -IPT_IPOPT-$(CONFIG_IP_NF_MATCH_TCPMSS) += ipt_tcpmss -IPT_IPOPT-$(CONFIG_NETFILTER_XT_MATCH_TCPMSS) += ipt_tcpmss -IPT_IPOPT-$(CONFIG_IP_NF_TARGET_TCPMSS) += ipt_TCPMSS -IPT_IPOPT-$(CONFIG_IP_NF_MATCH_TOS) += ipt_tos -IPT_IPOPT-$(CONFIG_IP_NF_MATCH_TIME) += ipt_time -IPT_IPOPT-$(CONFIG_IP_NF_TARGET_TOS) += ipt_TOS -IPT_IPOPT-$(CONFIG_IP_NF_MATCH_TTL) += ipt_ttl -IPT_IPOPT-$(CONFIG_IP_NF_TARGET_TTL) += ipt_TTL -IPT_IPOPT-$(CONFIG_IP_NF_MATCH_UNCLEAN) += ipt_unclean +IPT_IPOPT-$(CONFIG_IP_NF_MATCH_DSCP) += $(P_V4)ipt_dscp +IPT_IPOPT-$(CONFIG_IP_NF_TARGET_DSCP) += $(P_V4)ipt_DSCP +IPT_IPOPT-$(CONFIG_IP_NF_MATCH_ECN) += $(P_V4)ipt_ecn +IPT_IPOPT-$(CONFIG_IP_NF_TARGET_ECN) += $(P_V4)ipt_ECN +IPT_IPOPT-$(CONFIG_IP_NF_MATCH_LENGTH) += $(P_V4)ipt_length +IPT_IPOPT-$(CONFIG_NETFILTER_XT_MATCH_LENGTH) += $(P_XT)xt_length +IPT_IPOPT-$(CONFIG_IP_NF_MATCH_MAC) += $(P_V4)ipt_mac +IPT_IPOPT-$(CONFIG_NETFILTER_XT_MATCH_MAC) += $(P_XT)xt_mac +IPT_IPOPT-$(CONFIG_IP_NF_MATCH_MARK) += $(P_V4)ipt_mark +IPT_IPOPT-$(CONFIG_NETFILTER_XT_MATCH_MARK) += $(P_XT)xt_mark +IPT_IPOPT-$(CONFIG_IP_NF_TARGET_MARK) += $(P_V4)ipt_MARK +IPT_IPOPT-$(CONFIG_NETFILTER_XT_TARGET_MARK) += $(P_XT)xt_MARK +IPT_IPOPT-$(CONFIG_IP_NF_MATCH_TCPMSS) += $(P_V4)ipt_tcpmss +IPT_IPOPT-$(CONFIG_NETFILTER_XT_MATCH_TCPMSS) += $(P_XT)xt_tcpmss +IPT_IPOPT-$(CONFIG_IP_NF_TARGET_TCPMSS) += $(P_V4)ipt_TCPMSS +IPT_IPOPT-$(CONFIG_IP_NF_MATCH_TOS) += $(P_V4)ipt_tos +IPT_IPOPT-$(CONFIG_IP_NF_MATCH_TIME) += $(P_V4)ipt_time +IPT_IPOPT-$(CONFIG_IP_NF_TARGET_TOS) += $(P_V4)ipt_TOS +IPT_IPOPT-$(CONFIG_IP_NF_MATCH_TTL) += $(P_V4)ipt_ttl +IPT_IPOPT-$(CONFIG_IP_NF_TARGET_TTL) += $(P_V4)ipt_TTL +IPT_IPOPT-$(CONFIG_IP_NF_MATCH_UNCLEAN) += $(P_V4)ipt_unclean IPT_IPSEC-m := -IPT_IPSEC-$(CONFIG_IP_NF_MATCH_AH_ESP) += ipt_ah ipt_esp +IPT_IPSEC-$(CONFIG_IP_NF_MATCH_AH_ESP) += $(P_V4)ipt_ah $(P_V4)ipt_esp IPT_NAT-m := -IPT_NAT-$(CONFIG_IP_NF_NAT) += ipt_SNAT ipt_DNAT -IPT_NAT-$(CONFIG_IP_NF_TARGET_MASQUERADE) += ipt_MASQUERADE -IPT_NAT-$(CONFIG_IP_NF_TARGET_MIRROR) += ipt_MIRROR -IPT_NAT-$(CONFIG_IP_NF_TARGET_REDIRECT) += ipt_REDIRECT +IPT_NAT-$(CONFIG_IP_NF_NAT) += $(P_V4)ipt_SNAT $(P_V4)ipt_DNAT +IPT_NAT-$(CONFIG_IP_NF_TARGET_MASQUERADE) += $(P_V4)ipt_MASQUERADE +IPT_NAT-$(CONFIG_IP_NF_TARGET_MIRROR) += $(P_V4)ipt_MIRROR +IPT_NAT-$(CONFIG_IP_NF_TARGET_REDIRECT) += $(P_V4)ipt_REDIRECT IPT_NAT_EXTRA-m := -IPT_NAT_EXTRA-$(CONFIG_IP_NF_AMANDA) += ip_conntrack_amanda -IPT_NAT_EXTRA-$(CONFIG_IP_NF_CT_PROTO_GRE) += ip_conntrack_proto_gre -IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_PROTO_GRE) += ip_nat_proto_gre -IPT_NAT_EXTRA-$(CONFIG_IP_NF_H323) += ip_conntrack_h323 -IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_H323) += ip_nat_h323 -IPT_NAT_EXTRA-$(CONFIG_IP_NF_MMS) += ip_conntrack_mms -IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_MMS) += ip_nat_mms -IPT_NAT_EXTRA-$(CONFIG_IP_NF_RTSP) += ip_conntrack_rtsp -IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_RTSP) += ip_nat_rtsp -IPT_NAT_EXTRA-$(CONFIG_IP_NF_PPTP) += ip_conntrack_pptp -IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_PPTP) += ip_nat_pptp -IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_SNMP_BASIC) += ip_nat_snmp_basic -IPT_NAT_EXTRA-$(CONFIG_IP_NF_SIP) += ip_conntrack_sip -IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_SIP) += ip_nat_sip -IPT_NAT_EXTRA-$(CONFIG_IP_NF_TFTP) += ip_conntrack_tftp +IPT_NAT_EXTRA-$(CONFIG_IP_NF_AMANDA) += $(P_V4)ip_conntrack_amanda +IPT_NAT_EXTRA-$(CONFIG_IP_NF_CT_PROTO_GRE) += $(P_V4)ip_conntrack_proto_gre +IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_PROTO_GRE) += $(P_V4)ip_nat_proto_gre +IPT_NAT_EXTRA-$(CONFIG_IP_NF_H323) += $(P_V4)ip_conntrack_h323 +IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_H323) += $(P_V4)ip_nat_h323 +IPT_NAT_EXTRA-$(CONFIG_IP_NF_MMS) += $(P_V4)ip_conntrack_mms +IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_MMS) += $(P_V4)ip_nat_mms +IPT_NAT_EXTRA-$(CONFIG_IP_NF_RTSP) += $(P_V4)ip_conntrack_rtsp +IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_RTSP) += $(P_V4)ip_nat_rtsp +IPT_NAT_EXTRA-$(CONFIG_IP_NF_PPTP) += $(P_V4)ip_conntrack_pptp +IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_PPTP) += $(P_V4)ip_nat_pptp +IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_SNMP_BASIC) += $(P_V4)ip_nat_snmp_basic +IPT_NAT_EXTRA-$(CONFIG_IP_NF_SIP) += $(P_V4)ip_conntrack_sip +IPT_NAT_EXTRA-$(CONFIG_IP_NF_NAT_SIP) += $(P_V4)ip_nat_sip +IPT_NAT_EXTRA-$(CONFIG_IP_NF_TFTP) += $(P_V4)ip_conntrack_tftp IPT_QUEUE-m := -IPT_QUEUE-$(CONFIG_IP_NF_QUEUE) += ip_queue +IPT_QUEUE-$(CONFIG_IP_NF_QUEUE) += $(P_V4)ip_queue IPT_ULOG-m := -IPT_ULOG-$(CONFIG_IP_NF_TARGET_ULOG) += ipt_ULOG +IPT_ULOG-$(CONFIG_IP_NF_TARGET_ULOG) += $(P_V4)ipt_ULOG -IPT_BUILTIN := ipt_standard -IPT_BUILTIN += ipt_icmp ipt_tcp ipt_udp +IPT_BUILTIN := $(P_V4)ipt_standard +IPT_BUILTIN += $(P_V4)ipt_icmp $(P_V4)ipt_tcp $(P_V4)ipt_udp IPT_BUILTIN += $(IPT_CONNTRACK-y) IPT_BUILTIN += $(IPT_EXTRA-y) IPT_BUILTIN += $(IPT_FILTER-y) -- cgit v1.2.3