netfilter.mk 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  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-core
  12. SUBMENU:=$(NF_MENU)
  13. TITLE:=Netfilter core
  14. KCONFIG:=$(KCONFIG_IPT_CORE)
  15. FILES:=$(foreach mod,$(IPT_CORE-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  16. AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_CORE-m)))
  17. endef
  18. define KernelPackage/ipt-core/description
  19. Netfilter core kernel modules
  20. Includes:
  21. - limit
  22. - LOG
  23. - mac
  24. - multiport
  25. - TCPMSS
  26. - REJECT
  27. endef
  28. $(eval $(call KernelPackage,ipt-core))
  29. define KernelPackage/ipt-conntrack
  30. SUBMENU:=$(NF_MENU)
  31. TITLE:=Basic connection tracking modules
  32. KCONFIG:=$(KCONFIG_IPT_CONNTRACK)
  33. FILES:=$(foreach mod,$(IPT_CONNTRACK-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  34. AUTOLOAD:=$(call AutoLoad,41,$(notdir $(IPT_CONNTRACK-m)))
  35. DEPENDS:= kmod-ipt-core
  36. endef
  37. define KernelPackage/ipt-conntrack/description
  38. Netfilter (IPv4) kernel modules for connection tracking
  39. Includes:
  40. - state
  41. endef
  42. $(eval $(call KernelPackage,ipt-conntrack))
  43. define KernelPackage/ipt-conntrack-extra
  44. SUBMENU:=$(NF_MENU)
  45. TITLE:=Extra connection tracking modules
  46. KCONFIG:=$(KCONFIG_IPT_CONNTRACK_EXTRA)
  47. FILES:=$(foreach mod,$(IPT_CONNTRACK_EXTRA-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  48. AUTOLOAD:=$(call AutoLoad,42,$(notdir $(IPT_CONNTRACK_EXTRA-m)))
  49. DEPENDS:= kmod-ipt-core +kmod-ipt-conntrack
  50. endef
  51. define KernelPackage/ipt-conntrack-extra/description
  52. Netfilter (IPv4) extra kernel modules for connection tracking
  53. Includes:
  54. - connbytes
  55. - connmark/CONNMARK
  56. - conntrack
  57. - helper
  58. - recent
  59. - NOTRACK
  60. endef
  61. $(eval $(call KernelPackage,ipt-conntrack-extra))
  62. define KernelPackage/ipt-filter
  63. SUBMENU:=$(NF_MENU)
  64. TITLE:=Modules for packet content inspection
  65. KCONFIG:=$(KCONFIG_IPT_FILTER)
  66. FILES:=$(foreach mod,$(IPT_FILTER-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  67. AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_FILTER-m)))
  68. DEPENDS:= kmod-ipt-core
  69. endef
  70. define KernelPackage/ipt-filter/description
  71. Netfilter (IPv4) kernel modules for packet content inspection
  72. Includes:
  73. - ipt_ipp2p
  74. - ipt_layer7
  75. endef
  76. $(eval $(call KernelPackage,ipt-filter))
  77. define KernelPackage/ipt-ipopt
  78. SUBMENU:=$(NF_MENU)
  79. TITLE:=Modules for matching/changing IP packet options
  80. KCONFIG:=$(KCONFIG_IPT_IPOPT)
  81. FILES:=$(foreach mod,$(IPT_IPOPT-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  82. AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_IPOPT-m)))
  83. DEPENDS:= kmod-ipt-core
  84. endef
  85. define KernelPackage/ipt-ipopt/description
  86. Netfilter (IPv4) modules for matching/changing IP packet options
  87. Includes:
  88. - ipt_CLASSIFY
  89. - ipt_dscp/DSCP
  90. - ipt_ecn/ECN
  91. - ipt_length
  92. - ipt_tos/TOS
  93. - ipt_tcpmms
  94. - ipt_ttl/TTL
  95. - ipt_unclean
  96. endef
  97. $(eval $(call KernelPackage,ipt-ipopt))
  98. define KernelPackage/ipt-ipsec
  99. SUBMENU:=$(NF_MENU)
  100. TITLE:=Modules for matching IPSec packets
  101. KCONFIG:=$(KCONFIG_IPT_IPSEC)
  102. FILES:=$(foreach mod,$(IPT_IPSEC-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  103. AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_IPSEC-m)))
  104. DEPENDS:= kmod-ipt-core
  105. endef
  106. define KernelPackage/ipt-ipsec/description
  107. Netfilter (IPv4) modules for matching IPSec packets
  108. Includes:
  109. - ipt_ah
  110. - ipt_esp
  111. endef
  112. $(eval $(call KernelPackage,ipt-ipsec))
  113. define KernelPackage/ipt-nat
  114. SUBMENU:=$(NF_MENU)
  115. TITLE:=Basic NAT targets
  116. KCONFIG:=$(KCONFIG_IPT_NAT)
  117. FILES:=$(foreach mod,$(IPT_NAT-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  118. AUTOLOAD:=$(call AutoLoad,42,$(notdir $(IPT_NAT-m)))
  119. DEPENDS:= kmod-ipt-core +kmod-ipt-conntrack
  120. endef
  121. define KernelPackage/ipt-nat/description
  122. Netfilter (IPv4) kernel modules for basic NAT targets
  123. Includes:
  124. - MASQUERADE
  125. endef
  126. $(eval $(call KernelPackage,ipt-nat))
  127. define KernelPackage/ipt-nat-extra
  128. SUBMENU:=$(NF_MENU)
  129. TITLE:=Extra NAT targets
  130. KCONFIG:=$(KCONFIG_IPT_NAT_EXTRA)
  131. FILES:=$(foreach mod,$(IPT_NAT_EXTRA-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  132. AUTOLOAD:=$(call AutoLoad,43,$(notdir $(IPT_NAT_EXTRA-m)))
  133. DEPENDS:= kmod-ipt-core +kmod-ipt-nat
  134. endef
  135. define KernelPackage/ipt-nat-extra/description
  136. Netfilter (IPv4) kernel modules for extra NAT targets
  137. Includes:
  138. - MIRROR
  139. - NETMAP
  140. - REDIRECT
  141. endef
  142. $(eval $(call KernelPackage,ipt-nat-extra))
  143. define KernelPackage/ipt-nathelper
  144. SUBMENU:=$(NF_MENU)
  145. TITLE:=Basic Conntrack and NAT helpers
  146. KCONFIG:=$(KCONFIG_IPT_NATHELPER)
  147. FILES:=$(foreach mod,$(IPT_NATHELPER-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  148. AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_NATHELPER-m)))
  149. DEPENDS:= kmod-ipt-core +kmod-ipt-nat
  150. endef
  151. define KernelPackage/ipt-nathelper/description
  152. Default Netfilter (IPv4) Conntrack and NAT helpers
  153. Includes:
  154. - conntrack_ftp
  155. - nat_ftp
  156. - conntrack_irc
  157. - nat_irc
  158. - conntrack_tftp
  159. - nat_tftp
  160. endef
  161. $(eval $(call KernelPackage,ipt-nathelper))
  162. define KernelPackage/ipt-nathelper-extra
  163. SUBMENU:=$(NF_MENU)
  164. TITLE:=Extra Conntrack and NAT helpers
  165. KCONFIG:=$(KCONFIG_IPT_NATHELPER_EXTRA)
  166. FILES:=$(foreach mod,$(IPT_NATHELPER_EXTRA-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  167. AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_NATHELPER_EXTRA-m)))
  168. DEPENDS:= kmod-ipt-core +kmod-ipt-nat
  169. endef
  170. define KernelPackage/ipt-nathelper-extra/description
  171. Extra Netfilter (IPv4) Conntrack and NAT helpers
  172. Includes:
  173. - ip_conntrack_amanda
  174. - ip_conntrack_proto_gre
  175. - ip_nat_proto_gre
  176. - ip_conntrack_pptp
  177. - ip_nat_pptp
  178. - ip_conntrack_sip
  179. - ip_nat_sip
  180. - ip_nat_snmp_basic
  181. endef
  182. $(eval $(call KernelPackage,ipt-nathelper-extra))
  183. define KernelPackage/ipt-imq
  184. SUBMENU:=$(NF_MENU)
  185. TITLE:=Intermediate Queueing support
  186. KCONFIG:= \
  187. CONFIG_IMQ \
  188. CONFIG_IMQ_BEHAVIOR_BA=y \
  189. CONFIG_IMQ_NUM_DEVS=2 \
  190. CONFIG_IP_NF_TARGET_IMQ
  191. FILES:= \
  192. $(LINUX_DIR)/drivers/net/imq.$(LINUX_KMOD_SUFFIX) \
  193. $(foreach mod,$(IPT_IMQ-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  194. AUTOLOAD:=$(call AutoLoad,45,$(notdir \
  195. imq \
  196. $(IPT_IMQ-m) \
  197. ))
  198. DEPENDS:= kmod-ipt-core @!LINUX_2_6_27 @!LINUX_2_6_28
  199. endef
  200. define KernelPackage/ipt-imq/description
  201. Kernel support for Intermediate Queueing devices
  202. endef
  203. $(eval $(call KernelPackage,ipt-imq))
  204. define KernelPackage/ipt-queue
  205. SUBMENU:=$(NF_MENU)
  206. TITLE:=Module for user-space packet queueing
  207. KCONFIG:=$(KCONFIG_IPT_QUEUE)
  208. FILES:=$(foreach mod,$(IPT_QUEUE-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  209. AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_QUEUE-m)))
  210. DEPENDS:= kmod-ipt-core
  211. endef
  212. define KernelPackage/ipt-queue/description
  213. Netfilter (IPv4) module for user-space packet queueing
  214. Includes:
  215. - QUEUE
  216. endef
  217. $(eval $(call KernelPackage,ipt-queue))
  218. define KernelPackage/ipt-ulog
  219. SUBMENU:=$(NF_MENU)
  220. TITLE:=Module for user-space packet logging
  221. KCONFIG:=$(KCONFIG_IPT_ULOG)
  222. FILES:=$(foreach mod,$(IPT_ULOG-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  223. AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_ULOG-m)))
  224. DEPENDS:= kmod-ipt-core
  225. endef
  226. define KernelPackage/ipt-ulog/description
  227. Netfilter (IPv4) module for user-space packet logging
  228. Includes:
  229. - ipt_ULOG
  230. endef
  231. $(eval $(call KernelPackage,ipt-ulog))
  232. define KernelPackage/ipt-iprange
  233. SUBMENU:=$(NF_MENU)
  234. TITLE:=Module for matching ip ranges
  235. FILES:=$(foreach mod,$(IPT_IPRANGE-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  236. AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_IPRANGE-m)))
  237. DEPENDS:= kmod-ipt-core
  238. endef
  239. define KernelPackage/ipt-iprange/description
  240. Netfilter (IPv4) module for matching ip ranges
  241. Includes:
  242. - ipt_IPRANGE
  243. endef
  244. $(eval $(call KernelPackage,ipt-iprange))
  245. define KernelPackage/ipt-ipset
  246. SUBMENU:=$(NF_MENU)
  247. TITLE:=IPSET Modules
  248. KCONFIG:=$(KCONFIG_IPT_IPSET)
  249. FILES:=$(foreach mod,$(IPT_IPSET-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  250. AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_IPSET-m)))
  251. DEPENDS:= kmod-ipt-core
  252. endef
  253. define KernelPackage/ipt-ipset/description
  254. Netfilter kernel modules for ipset
  255. Includes:
  256. - ip_set
  257. - ip_set_iphash
  258. - ip_set_ipmap
  259. - ip_set_ipporthash
  260. - ip_set_iptree
  261. - ip_set_iptreemap
  262. - ip_set_macipmap
  263. - ip_set_nethash
  264. - ip_set_portmap
  265. - ipt_set
  266. - ipt_SET
  267. endef
  268. $(eval $(call KernelPackage,ipt-ipset))
  269. define KernelPackage/ipt-extra
  270. SUBMENU:=$(NF_MENU)
  271. TITLE:=Extra modules
  272. KCONFIG:=$(KCONFIG_IPT_EXTRA)
  273. FILES:=$(foreach mod,$(IPT_EXTRA-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  274. AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_EXTRA-m)))
  275. DEPENDS:= kmod-ipt-core
  276. endef
  277. define KernelPackage/ipt-extra/description
  278. Other Netfilter (IPv4) kernel modules
  279. Includes:
  280. - ipt_owner
  281. - ipt_physdev
  282. - ipt_pkttype
  283. - ipt_recent
  284. - iptable_raw
  285. - xt_NOTRACK
  286. - xt_TARPIT
  287. - xt_DELUDE
  288. - xt_CHAOS
  289. endef
  290. $(eval $(call KernelPackage,ipt-extra))
  291. define KernelPackage/ip6tables
  292. SUBMENU:=$(NF_MENU)
  293. TITLE:=IPv6 modules
  294. DEPENDS:=+kmod-ipv6
  295. KCONFIG:=CONFIG_IP6_NF_IPTABLES
  296. FILES:=$(foreach mod,$(IPT_IPV6-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
  297. AUTOLOAD:=$(call AutoLoad,49,$(notdir $(IPT_IPV6-m)))
  298. endef
  299. define KernelPackage/ip6tables/description
  300. Netfilter IPv6 firewalling support
  301. endef
  302. $(eval $(call KernelPackage,ip6tables))
  303. define KernelPackage/arptables
  304. SUBMENU:=$(NF_MENU)
  305. TITLE:=ARP firewalling modules
  306. FILES:=$(LINUX_DIR)/net/ipv4/netfilter/arp*.$(LINUX_KMOD_SUFFIX)
  307. KCONFIG:=CONFIG_IP_NF_ARPTABLES
  308. AUTOLOAD:=$(call AutoLoad,49,$(notdir $(patsubst %.ko,%,$(wildcard $(LINUX_DIR)/net/ipv4/netfilter/arp*.$(LINUX_KMOD_SUFFIX)))))
  309. endef
  310. define KernelPackage/arptables/description
  311. Kernel modules for ARP firewalling
  312. endef
  313. $(eval $(call KernelPackage,arptables))
  314. define KernelPackage/ebtables
  315. SUBMENU:=$(NF_MENU)
  316. TITLE:=Bridge firewalling modules
  317. DEPENDS:=@LINUX_2_6
  318. FILES:=$(LINUX_DIR)/net/bridge/netfilter/*.$(LINUX_KMOD_SUFFIX)
  319. KCONFIG:=CONFIG_BRIDGE_NETFILTER=y \
  320. CONFIG_BRIDGE_NF_EBTABLES
  321. AUTOLOAD:=$(call AutoLoad,49,$(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)))))
  322. endef
  323. define KernelPackage/ebtables/description
  324. Kernel modules for Ethernet Bridge firewalling
  325. endef
  326. $(eval $(call KernelPackage,ebtables))