netfilter.mk 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. #
  2. # Copyright (C) 2006-2008 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. # $Id$
  8. NF_MENU:=Netfilter Extensions
  9. NF_KMOD:=1
  10. include $(INCLUDE_DIR)/netfilter.mk
  11. define KernelPackage/ipt-conntrack
  12. SUBMENU:=$(NF_MENU)
  13. TITLE:=Modules for connection tracking
  14. KCONFIG:=$(KCONFIG_IPT_CONNTRACK)
  15. FILES:=$(foreach mod,$(IPT_CONNTRACK-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  16. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_CONNTRACK-m)))
  17. endef
  18. define KernelPackage/ipt-conntrack/description
  19. Netfilter (IPv4) kernel modules for connection tracking
  20. Includes:
  21. - ipt_conntrack
  22. - ipt_helper
  23. - ipt_connmark/CONNMARK
  24. endef
  25. $(eval $(call KernelPackage,ipt-conntrack))
  26. define KernelPackage/ipt-filter
  27. SUBMENU:=$(NF_MENU)
  28. TITLE:=Modules for packet content inspection
  29. KCONFIG:=$(KCONFIG_IPT_FILTER)
  30. FILES:=$(foreach mod,$(IPT_FILTER-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  31. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_FILTER-m)))
  32. endef
  33. define KernelPackage/ipt-filter/description
  34. Netfilter (IPv4) kernel modules for packet content inspection
  35. Includes:
  36. - ipt_ipp2p
  37. - ipt_layer7
  38. endef
  39. $(eval $(call KernelPackage,ipt-filter))
  40. define KernelPackage/ipt-ipopt
  41. SUBMENU:=$(NF_MENU)
  42. TITLE:=Modules for matching/changing IP packet options
  43. KCONFIG:=$(KCONFIG_IPT_IPOPT)
  44. FILES:=$(foreach mod,$(IPT_IPOPT-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  45. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_IPOPT-m)))
  46. endef
  47. define KernelPackage/ipt-ipopt/description
  48. Netfilter (IPv4) modules for matching/changing IP packet options
  49. Includes:
  50. - ipt_CLASSIFY
  51. - ipt_dscp/DSCP
  52. - ipt_ecn/ECN
  53. - ipt_length
  54. - ipt_mac
  55. - ipt_tos/TOS
  56. - ipt_tcpmms
  57. - ipt_ttl/TTL
  58. - ipt_unclean
  59. endef
  60. $(eval $(call KernelPackage,ipt-ipopt))
  61. define KernelPackage/ipt-ipsec
  62. SUBMENU:=$(NF_MENU)
  63. TITLE:=Modules for matching IPSec packets
  64. KCONFIG:=$(KCONFIG_IPT_IPSEC)
  65. FILES:=$(foreach mod,$(IPT_IPSEC-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  66. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_IPSEC-m)))
  67. endef
  68. define KernelPackage/ipt-ipsec/description
  69. Netfilter (IPv4) modules for matching IPSec packets
  70. Includes:
  71. - ipt_ah
  72. - ipt_esp
  73. endef
  74. $(eval $(call KernelPackage,ipt-ipsec))
  75. define KernelPackage/ipt-nat
  76. SUBMENU:=$(NF_MENU)
  77. TITLE:=Modules for extra NAT targets
  78. KCONFIG:=$(KCONFIG_IPT_NAT)
  79. FILES:=$(foreach mod,$(IPT_NAT-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  80. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_NAT-m)))
  81. endef
  82. define KernelPackage/ipt-nat/description
  83. Netfilter (IPv4) modules for extra NAT targets
  84. Includes:
  85. - ipt_REDIRECT
  86. - ipt_NETMAP
  87. endef
  88. $(eval $(call KernelPackage,ipt-nat))
  89. define KernelPackage/ipt-nathelper
  90. SUBMENU:=$(NF_MENU)
  91. TITLE:=Default Conntrack and NAT helpers
  92. KCONFIG:=$(KCONFIG_IPT_NATHELPER)
  93. FILES:=$(foreach mod,$(IPT_NATHELPER-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  94. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_NATHELPER-m)))
  95. endef
  96. define KernelPackage/ipt-nathelper/description
  97. Default Netfilter (IPv4) Conntrack and NAT helpers
  98. Includes:
  99. - ip_conntrack_ftp
  100. - ip_nat_ftp
  101. - ip_conntrack_irc
  102. - ip_nat_irc
  103. - ip_conntrack_tftp
  104. endef
  105. $(eval $(call KernelPackage,ipt-nathelper))
  106. define KernelPackage/ipt-nathelper-extra
  107. SUBMENU:=$(NF_MENU)
  108. TITLE:=Extra Conntrack and NAT helpers
  109. KCONFIG:=$(KCONFIG_IPT_NATHELPER_EXTRA)
  110. FILES:=$(foreach mod,$(IPT_NATHELPER_EXTRA-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  111. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_NATHELPER_EXTRA-m)))
  112. endef
  113. define KernelPackage/ipt-nathelper-extra/description
  114. Extra Netfilter (IPv4) Conntrack and NAT helpers
  115. Includes:
  116. - ip_conntrack_amanda
  117. - ip_conntrack_proto_gre
  118. - ip_nat_proto_gre
  119. - ip_conntrack_pptp
  120. - ip_nat_pptp
  121. - ip_conntrack_sip
  122. - ip_nat_sip
  123. - ip_nat_snmp_basic
  124. endef
  125. $(eval $(call KernelPackage,ipt-nathelper-extra))
  126. define KernelPackage/ipt-imq
  127. SUBMENU:=$(NF_MENU)
  128. TITLE:=Intermediate Queueing support
  129. KCONFIG:= \
  130. CONFIG_IMQ \
  131. CONFIG_IMQ_BEHAVIOR_BA=y \
  132. CONFIG_IMQ_NUM_DEVS=2 \
  133. CONFIG_IP_NF_TARGET_IMQ
  134. FILES:= \
  135. $(LINUX_DIR)/drivers/net/imq.$(LINUX_KMOD_SUFFIX) \
  136. $(foreach mod,$(IPT_IMQ-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  137. AUTOLOAD:=$(call AutoLoad,40,$(notdir \
  138. $(LINUX_DIR)/drivers/net/imq.$(LINUX_KMOD_SUFFIX) \
  139. $(IPT_IMQ-m) \
  140. ))
  141. endef
  142. define KernelPackage/ipt-imq/description
  143. Kernel support for Intermediate Queueing devices
  144. endef
  145. $(eval $(call KernelPackage,ipt-imq))
  146. define KernelPackage/ipt-queue
  147. SUBMENU:=$(NF_MENU)
  148. TITLE:=Module for user-space packet queueing
  149. KCONFIG:=$(KCONFIG_IPT_QUEUE)
  150. FILES:=$(foreach mod,$(IPT_QUEUE-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  151. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_QUEUE-m)))
  152. endef
  153. define KernelPackage/ipt-queue/description
  154. Netfilter (IPv4) module for user-space packet queueing
  155. Includes:
  156. - ipt_QUEUE
  157. endef
  158. $(eval $(call KernelPackage,ipt-queue))
  159. define KernelPackage/ipt-ulog
  160. SUBMENU:=$(NF_MENU)
  161. TITLE:=Module for user-space packet logging
  162. KCONFIG:=$(KCONFIG_IPT_ULOG)
  163. FILES:=$(foreach mod,$(IPT_ULOG-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  164. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_ULOG-m)))
  165. endef
  166. define KernelPackage/ipt-ulog/description
  167. Netfilter (IPv4) module for user-space packet logging
  168. Includes:
  169. - ipt_ULOG
  170. endef
  171. $(eval $(call KernelPackage,ipt-ulog))
  172. define KernelPackage/ipt-iprange
  173. SUBMENU:=$(NF_MENU)
  174. TITLE:=Module for matching ip ranges
  175. FILES:=$(foreach mod,$(IPT_IPRANGE-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  176. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_IPRANGE-m)))
  177. endef
  178. define KernelPackage/ipt-iprange/description
  179. Netfilter (IPv4) module for matching ip ranges
  180. Includes:
  181. - ipt_IPRANGE
  182. endef
  183. $(eval $(call KernelPackage,ipt-iprange))
  184. define KernelPackage/ipt-ipset
  185. SUBMENU:=$(NF_MENU)
  186. TITLE:=IPSET Modules
  187. KCONFIG:=$(KCONFIG_IPT_IPSET)
  188. FILES:=$(foreach mod,$(IPT_IPSET-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  189. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_IPSET-m)))
  190. endef
  191. define KernelPackage/ipt-ipset/description
  192. Netfilter kernel modules for ipset
  193. Includes:
  194. - ip_set
  195. - ip_set_iphash
  196. - ip_set_ipmap
  197. - ip_set_ipporthash
  198. - ip_set_iptree
  199. - ip_set_iptreemap
  200. - ip_set_macipmap
  201. - ip_set_nethash
  202. - ip_set_portmap
  203. - ipt_set
  204. - ipt_SET
  205. endef
  206. $(eval $(call KernelPackage,ipt-ipset))
  207. define KernelPackage/ipt-extra
  208. SUBMENU:=$(NF_MENU)
  209. TITLE:=Extra modules
  210. KCONFIG:=$(KCONFIG_IPT_EXTRA)
  211. FILES:=$(foreach mod,$(IPT_EXTRA-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  212. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_EXTRA-m)))
  213. endef
  214. define KernelPackage/ipt-extra/description
  215. Other Netfilter (IPv4) kernel modules
  216. Includes:
  217. - ipt_limit
  218. - ipt_owner
  219. - ipt_physdev
  220. - ipt_pkttype
  221. - ipt_recent
  222. - iptable_raw
  223. - xt_NOTRACK
  224. - xt_TARPIT
  225. - xt_DELUDE
  226. - xt_CHAOS
  227. endef
  228. $(eval $(call KernelPackage,ipt-extra))
  229. define KernelPackage/ip6tables
  230. SUBMENU:=$(NF_MENU)
  231. TITLE:=IPv6 modules
  232. DEPENDS:=+kmod-ipv6
  233. KCONFIG:=CONFIG_IP6_NF_IPTABLES
  234. FILES:=$(foreach mod,$(IPT_IPV6-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  235. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_IPV6-m)))
  236. endef
  237. define KernelPackage/ip6tables/description
  238. Netfilter IPv6 firewalling support
  239. endef
  240. $(eval $(call KernelPackage,ip6tables))
  241. define KernelPackage/arptables
  242. SUBMENU:=$(NF_MENU)
  243. TITLE:=ARP firewalling modules
  244. FILES:=$(LINUX_DIR)/net/ipv4/netfilter/arp*.$(LINUX_KMOD_SUFFIX)
  245. KCONFIG:=CONFIG_IP_NF_ARPTABLES
  246. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(patsubst %.ko,%,$(wildcard $(LINUX_DIR)/net/ipv4/netfilter/arp*.$(LINUX_KMOD_SUFFIX)))))
  247. endef
  248. define KernelPackage/arptables/description
  249. Kernel modules for ARP firewalling
  250. endef
  251. $(eval $(call KernelPackage,arptables))
  252. define KernelPackage/ebtables
  253. SUBMENU:=$(NF_MENU)
  254. TITLE:=Bridge firewalling modules
  255. DEPENDS:=@LINUX_2_6
  256. FILES:=$(LINUX_DIR)/net/bridge/netfilter/*.$(LINUX_KMOD_SUFFIX)
  257. KCONFIG:=CONFIG_BRIDGE_NETFILTER=y \
  258. CONFIG_BRIDGE_NF_EBTABLES
  259. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(patsubst %.ko,%,ebtables.ko $(wildcard $(LINUX_DIR)/net/bridge/netfilter/ebtable_*.$(LINUX_KMOD_SUFFIX)) $(wildcard $(LINUX_DIR)/net/bridge/netfilter/ebt_*.$(LINUX_KMOD_SUFFIX)))))
  260. endef
  261. define KernelPackage/ebtables/description
  262. Kernel modules for Ethernet Bridge firewalling
  263. endef
  264. $(eval $(call KernelPackage,ebtables))