netfilter.mk 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. #
  2. # Copyright (C) 2006 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. include $(INCLUDE_DIR)/netfilter.mk
  10. define KernelPackage/ipt-conntrack
  11. SUBMENU:=$(NF_MENU)
  12. TITLE:=Modules for connection tracking
  13. KCONFIG:=$(KCONFIG_IPT_CONNTRACK)
  14. FILES:=$(foreach mod,$(IPT_CONNTRACK-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  15. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_CONNTRACK-m)))
  16. endef
  17. define KernelPackage/ipt-conntrack/description
  18. Netfilter (IPv4) kernel modules for connection tracking
  19. Includes:
  20. - ipt_conntrack
  21. - ipt_helper
  22. - ipt_connmark/CONNMARK
  23. endef
  24. $(eval $(call KernelPackage,ipt-conntrack))
  25. define KernelPackage/ipt-filter
  26. SUBMENU:=$(NF_MENU)
  27. TITLE:=Modules for packet content inspection
  28. KCONFIG:=$(KCONFIG_IPT_FILTER)
  29. FILES:=$(foreach mod,$(IPT_FILTER-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  30. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_FILTER-m)))
  31. endef
  32. define KernelPackage/ipt-filter/description
  33. Netfilter (IPv4) kernel modules for packet content inspection
  34. Includes:
  35. - ipt_ipp2p
  36. - ipt_layer7
  37. endef
  38. $(eval $(call KernelPackage,ipt-filter))
  39. define KernelPackage/ipt-ipopt
  40. SUBMENU:=$(NF_MENU)
  41. TITLE:=Modules for matching/changing IP packet options
  42. KCONFIG:=$(KCONFIG_IPT_IPOPT)
  43. FILES:=$(foreach mod,$(IPT_IPOPT-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  44. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_IPOPT-m)))
  45. endef
  46. define KernelPackage/ipt-ipopt/description
  47. Netfilter (IPv4) modules for matching/changing IP packet options
  48. Includes:
  49. - ipt_CLASSIFY
  50. - ipt_dscp/DSCP
  51. - ipt_ecn/ECN
  52. - ipt_length
  53. - ipt_mac
  54. - ipt_tos/TOS
  55. - ipt_tcpmms
  56. - ipt_ttl/TTL
  57. - ipt_unclean
  58. endef
  59. $(eval $(call KernelPackage,ipt-ipopt))
  60. define KernelPackage/ipt-ipsec
  61. SUBMENU:=$(NF_MENU)
  62. TITLE:=Modules for matching IPSec packets
  63. KCONFIG:=$(KCONFIG_IPT_IPSEC)
  64. FILES:=$(foreach mod,$(IPT_IPSEC-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  65. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_IPSEC-m)))
  66. endef
  67. define KernelPackage/ipt-ipsec/description
  68. Netfilter (IPv4) modules for matching IPSec packets
  69. Includes:
  70. - ipt_ah
  71. - ipt_esp
  72. endef
  73. $(eval $(call KernelPackage,ipt-ipsec))
  74. define KernelPackage/ipt-nat
  75. SUBMENU:=$(NF_MENU)
  76. TITLE:=Modules for extra NAT targets
  77. KCONFIG:=$(KCONFIG_IPT_NAT)
  78. FILES:=$(foreach mod,$(IPT_NAT-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  79. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_NAT-m)))
  80. endef
  81. define KernelPackage/ipt-nat/description
  82. Netfilter (IPv4) modules for extra NAT targets
  83. Includes:
  84. - ipt_REDIRECT
  85. - ipt_NETMAP
  86. endef
  87. $(eval $(call KernelPackage,ipt-nat))
  88. define KernelPackage/ipt-nathelper
  89. SUBMENU:=$(NF_MENU)
  90. TITLE:=Default Conntrack and NAT helpers
  91. KCONFIG:=$(KCONFIG_IPT_NAT_DEFAULT)
  92. FILES:=$(foreach mod,$(IPT_NAT_DEFAULT-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  93. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_NAT_DEFAULT-m)))
  94. endef
  95. define KernelPackage/ipt-nathelper/description
  96. Default Netfilter (IPv4) Conntrack and NAT helpers
  97. Includes:
  98. - ip_conntrack_ftp
  99. - ip_nat_ftp
  100. - ip_conntrack_irc
  101. - ip_nat_irc
  102. - ip_conntrack_tftp
  103. endef
  104. $(eval $(call KernelPackage,ipt-nathelper))
  105. define KernelPackage/ipt-nathelper-extra
  106. SUBMENU:=$(NF_MENU)
  107. TITLE:=Extra Conntrack and NAT helpers
  108. KCONFIG:=$(KCONFIG_IPT_NAT_EXTRA)
  109. FILES:=$(foreach mod,$(IPT_NAT_EXTRA-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  110. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_NAT_EXTRA-m)))
  111. endef
  112. define KernelPackage/ipt-nathelper-extra/description
  113. Extra Netfilter (IPv4) Conntrack and NAT helpers
  114. Includes:
  115. - ip_conntrack_amanda
  116. - ip_conntrack_proto_gre
  117. - ip_nat_proto_gre
  118. - ip_conntrack_pptp
  119. - ip_nat_pptp
  120. - ip_conntrack_sip
  121. - ip_nat_sip
  122. - ip_nat_snmp_basic
  123. endef
  124. $(eval $(call KernelPackage,ipt-nathelper-extra))
  125. define KernelPackage/ipt-imq
  126. SUBMENU:=$(NF_MENU)
  127. TITLE:=Intermediate Queueing support
  128. KCONFIG:=CONFIG_IP_NF_TARGET_IMQ
  129. DEPENDS:=@!LINUX_2_6_25
  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_NF_EBTABLES
  249. 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)))))
  250. endef
  251. define KernelPackage/ebtables/description
  252. Kernel modules for Ethernet Bridge firewalling
  253. endef
  254. $(eval $(call KernelPackage,ebtables))