netfilter.mk 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  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:=CONFIG_IP_NF_TARGET_IMQ
  130. FILES:=$(LINUX_DIR)/net/ipv4/netfilter/*IMQ*.$(LINUX_KMOD_SUFFIX) $(LINUX_DIR)/drivers/net/imq.$(LINUX_KMOD_SUFFIX)
  131. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(patsubst %.ko,%,$(wildcard $(LINUX_DIR)/net/ipv4/netfilter/*IMQ*.$(LINUX_KMOD_SUFFIX) $(LINUX_DIR)/drivers/net/imq.$(LINUX_KMOD_SUFFIX)))))
  132. endef
  133. define KernelPackage/ipt-imq/description
  134. Kernel support for Intermediate Queueing devices
  135. endef
  136. $(eval $(call KernelPackage,ipt-imq))
  137. define KernelPackage/ipt-queue
  138. SUBMENU:=$(NF_MENU)
  139. TITLE:=Module for user-space packet queueing
  140. KCONFIG:=$(KCONFIG_IPT_QUEUE)
  141. FILES:=$(foreach mod,$(IPT_QUEUE-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  142. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_QUEUE-m)))
  143. endef
  144. define KernelPackage/ipt-queue/description
  145. Netfilter (IPv4) module for user-space packet queueing
  146. Includes:
  147. - ipt_QUEUE
  148. endef
  149. $(eval $(call KernelPackage,ipt-queue))
  150. define KernelPackage/ipt-ulog
  151. SUBMENU:=$(NF_MENU)
  152. TITLE:=Module for user-space packet logging
  153. KCONFIG:=$(KCONFIG_IPT_ULOG)
  154. FILES:=$(foreach mod,$(IPT_ULOG-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  155. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_ULOG-m)))
  156. endef
  157. define KernelPackage/ipt-ulog/description
  158. Netfilter (IPv4) module for user-space packet logging
  159. Includes:
  160. - ipt_ULOG
  161. endef
  162. $(eval $(call KernelPackage,ipt-ulog))
  163. define KernelPackage/ipt-iprange
  164. SUBMENU:=$(NF_MENU)
  165. TITLE:=Module for matching ip ranges
  166. FILES:=$(foreach mod,$(IPT_IPRANGE-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  167. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_IPRANGE-m)))
  168. endef
  169. define KernelPackage/ipt-iprange/description
  170. Netfilter (IPv4) module for matching ip ranges
  171. Includes:
  172. - ipt_IPRANGE
  173. endef
  174. $(eval $(call KernelPackage,ipt-iprange))
  175. define KernelPackage/ipt-ipset
  176. SUBMENU:=$(NF_MENU)
  177. TITLE:=IPSET Modules
  178. KCONFIG:=$(KCONFIG_IPT_IPSET)
  179. FILES:=$(foreach mod,$(IPT_IPSET-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  180. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_IPSET-m)))
  181. endef
  182. define KernelPackage/ipt-ipset/description
  183. Netfilter kernel modules for ipset
  184. Includes:
  185. - ip_set
  186. - ip_set_iphash
  187. - ip_set_ipmap
  188. - ip_set_ipporthash
  189. - ip_set_iptree
  190. - ip_set_iptreemap
  191. - ip_set_macipmap
  192. - ip_set_nethash
  193. - ip_set_portmap
  194. - ipt_set
  195. - ipt_SET
  196. endef
  197. $(eval $(call KernelPackage,ipt-ipset))
  198. define KernelPackage/ipt-extra
  199. SUBMENU:=$(NF_MENU)
  200. TITLE:=Extra modules
  201. KCONFIG:=$(KCONFIG_IPT_EXTRA)
  202. FILES:=$(foreach mod,$(IPT_EXTRA-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  203. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_EXTRA-m)))
  204. endef
  205. define KernelPackage/ipt-extra/description
  206. Other Netfilter (IPv4) kernel modules
  207. Includes:
  208. - ipt_limit
  209. - ipt_owner
  210. - ipt_physdev
  211. - ipt_pkttype
  212. - ipt_recent
  213. - iptable_raw
  214. - xt_NOTRACK
  215. - xt_TARPIT
  216. - xt_DELUDE
  217. - xt_CHAOS
  218. endef
  219. $(eval $(call KernelPackage,ipt-extra))
  220. define KernelPackage/ip6tables
  221. SUBMENU:=$(NF_MENU)
  222. TITLE:=IPv6 modules
  223. DEPENDS:=+kmod-ipv6
  224. KCONFIG:=CONFIG_IP6_NF_IPTABLES
  225. FILES:=$(foreach mod,$(IPT_IPV6-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  226. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_IPV6-m)))
  227. endef
  228. define KernelPackage/ip6tables/description
  229. Netfilter IPv6 firewalling support
  230. endef
  231. $(eval $(call KernelPackage,ip6tables))
  232. define KernelPackage/arptables
  233. SUBMENU:=$(NF_MENU)
  234. TITLE:=ARP firewalling modules
  235. FILES:=$(LINUX_DIR)/net/ipv4/netfilter/arp*.$(LINUX_KMOD_SUFFIX)
  236. KCONFIG:=CONFIG_IP_NF_ARPTABLES
  237. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(patsubst %.ko,%,$(wildcard $(LINUX_DIR)/net/ipv4/netfilter/arp*.$(LINUX_KMOD_SUFFIX)))))
  238. endef
  239. define KernelPackage/arptables/description
  240. Kernel modules for ARP firewalling
  241. endef
  242. $(eval $(call KernelPackage,arptables))
  243. define KernelPackage/ebtables
  244. SUBMENU:=$(NF_MENU)
  245. TITLE:=Bridge firewalling modules
  246. DEPENDS:=@LINUX_2_6
  247. FILES:=$(LINUX_DIR)/net/bridge/netfilter/*.$(LINUX_KMOD_SUFFIX)
  248. KCONFIG:=CONFIG_BRIDGE_NETFILTER=y \
  249. CONFIG_BRIDGE_NF_EBTABLES
  250. 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)))))
  251. endef
  252. define KernelPackage/ebtables/description
  253. Kernel modules for Ethernet Bridge firewalling
  254. endef
  255. $(eval $(call KernelPackage,ebtables))