61226ee7f09abee1858ab3654395d810cd8c3b4d
[openwrt.git] / package / kernel / modules / netfilter.mk
1
2 #
3 # Copyright (C) 2006-2010 OpenWrt.org
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8
9 NF_MENU:=Netfilter Extensions
10 NF_KMOD:=1
11 include $(INCLUDE_DIR)/netfilter.mk
12
13 define KernelPackage/ipt-core
14 SUBMENU:=$(NF_MENU)
15 TITLE:=Netfilter core
16 KCONFIG:= \
17 CONFIG_NETFILTER=y \
18 CONFIG_NETFILTER_ADVANCED=y \
19 $(KCONFIG_IPT_CORE)
20 FILES:=$(foreach mod,$(IPT_CORE-m),$(LINUX_DIR)/net/$(mod).ko)
21 AUTOLOAD:=$(call AutoLoad,40,$(notdir $(IPT_CORE-m)))
22 endef
23
24 define KernelPackage/ipt-core/description
25 Netfilter core kernel modules
26 Includes:
27 - comment
28 - limit
29 - LOG
30 - mac
31 - multiport
32 - REJECT
33 - TCPMSS
34 endef
35
36 $(eval $(call KernelPackage,ipt-core))
37
38
39 define AddDepends/ipt
40 SUBMENU:=$(NF_MENU)
41 DEPENDS+= kmod-ipt-core $(1)
42 endef
43
44
45 define KernelPackage/ipt-conntrack
46 TITLE:=Basic connection tracking modules
47 KCONFIG:=$(KCONFIG_IPT_CONNTRACK)
48 FILES:=$(foreach mod,$(IPT_CONNTRACK-m),$(LINUX_DIR)/net/$(mod).ko)
49 AUTOLOAD:=$(call AutoLoad,41,$(notdir $(IPT_CONNTRACK-m)))
50 $(call AddDepends/ipt)
51 endef
52
53 define KernelPackage/ipt-conntrack/description
54 Netfilter (IPv4) kernel modules for connection tracking
55 Includes:
56 - conntrack
57 - defrag
58 - iptables_raw
59 - NOTRACK
60 - state
61 endef
62
63 $(eval $(call KernelPackage,ipt-conntrack))
64
65
66 define KernelPackage/ipt-conntrack-extra
67 TITLE:=Extra connection tracking modules
68 KCONFIG:=$(KCONFIG_IPT_CONNTRACK_EXTRA)
69 FILES:=$(foreach mod,$(IPT_CONNTRACK_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
70 AUTOLOAD:=$(call AutoLoad,42,$(notdir $(IPT_CONNTRACK_EXTRA-m)))
71 $(call AddDepends/ipt,+kmod-ipt-conntrack)
72 endef
73
74 define KernelPackage/ipt-conntrack-extra/description
75 Netfilter (IPv4) extra kernel modules for connection tracking
76 Includes:
77 - connbytes
78 - connmark/CONNMARK
79 - conntrack
80 - helper
81 - recent
82 endef
83
84 $(eval $(call KernelPackage,ipt-conntrack-extra))
85
86
87 define KernelPackage/ipt-filter
88 TITLE:=Modules for packet content inspection
89 KCONFIG:=$(KCONFIG_IPT_FILTER)
90 FILES:=$(foreach mod,$(IPT_FILTER-m),$(LINUX_DIR)/net/$(mod).ko)
91 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_FILTER-m)))
92 $(call AddDepends/ipt,+kmod-textsearch)
93 endef
94
95 define KernelPackage/ipt-filter/description
96 Netfilter (IPv4) kernel modules for packet content inspection
97 Includes:
98 - layer7
99 - string
100 endef
101
102 $(eval $(call KernelPackage,ipt-filter))
103
104
105 define KernelPackage/ipt-ipopt
106 TITLE:=Modules for matching/changing IP packet options
107 KCONFIG:=$(KCONFIG_IPT_IPOPT)
108 FILES:=$(foreach mod,$(IPT_IPOPT-m),$(LINUX_DIR)/net/$(mod).ko)
109 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_IPOPT-m)))
110 $(call AddDepends/ipt)
111 endef
112
113 define KernelPackage/ipt-ipopt/description
114 Netfilter (IPv4) modules for matching/changing IP packet options
115 Includes:
116 - CLASSIFY
117 - dscp/DSCP
118 - ecn/ECN
119 - hl/HL
120 - length
121 - mark/MARK
122 - statistic
123 - tcpmss
124 - time
125 - unclean
126 endef
127
128 $(eval $(call KernelPackage,ipt-ipopt))
129
130
131 define KernelPackage/ipt-ipsec
132 TITLE:=Modules for matching IPSec packets
133 KCONFIG:=$(KCONFIG_IPT_IPSEC)
134 FILES:=$(foreach mod,$(IPT_IPSEC-m),$(LINUX_DIR)/net/$(mod).ko)
135 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_IPSEC-m)))
136 $(call AddDepends/ipt)
137 endef
138
139 define KernelPackage/ipt-ipsec/description
140 Netfilter (IPv4) modules for matching IPSec packets
141 Includes:
142 - ah
143 - esp
144 - policy
145 endef
146
147 $(eval $(call KernelPackage,ipt-ipsec))
148
149
150 define KernelPackage/ipt-nat
151 TITLE:=Basic NAT targets
152 KCONFIG:=$(KCONFIG_IPT_NAT)
153 FILES:=$(foreach mod,$(IPT_NAT-m),$(LINUX_DIR)/net/$(mod).ko)
154 AUTOLOAD:=$(call AutoLoad,42,$(notdir $(IPT_NAT-m)))
155 $(call AddDepends/ipt,+kmod-ipt-conntrack)
156 endef
157
158 define KernelPackage/ipt-nat/description
159 Netfilter (IPv4) kernel modules for basic NAT targets
160 Includes:
161 - MASQUERADE
162 endef
163
164 $(eval $(call KernelPackage,ipt-nat))
165
166
167 define KernelPackage/ipt-nat-extra
168 TITLE:=Extra NAT targets
169 KCONFIG:=$(KCONFIG_IPT_NAT_EXTRA)
170 FILES:=$(foreach mod,$(IPT_NAT_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
171 AUTOLOAD:=$(call AutoLoad,43,$(notdir $(IPT_NAT_EXTRA-m)))
172 $(call AddDepends/ipt,+kmod-ipt-nat)
173 endef
174
175 define KernelPackage/ipt-nat-extra/description
176 Netfilter (IPv4) kernel modules for extra NAT targets
177 Includes:
178 - NETMAP
179 - REDIRECT
180 endef
181
182 $(eval $(call KernelPackage,ipt-nat-extra))
183
184
185 define KernelPackage/ipt-nathelper
186 TITLE:=Basic Conntrack and NAT helpers
187 KCONFIG:=$(KCONFIG_IPT_NATHELPER)
188 FILES:=$(foreach mod,$(IPT_NATHELPER-m),$(LINUX_DIR)/net/$(mod).ko)
189 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_NATHELPER-m)))
190 $(call AddDepends/ipt,+kmod-ipt-nat)
191 endef
192
193 define KernelPackage/ipt-nathelper/description
194 Default Netfilter (IPv4) Conntrack and NAT helpers
195 Includes:
196 - ftp
197 - irc
198 - tftp
199 endef
200
201 $(eval $(call KernelPackage,ipt-nathelper))
202
203
204 define KernelPackage/ipt-nathelper-extra
205 TITLE:=Extra Conntrack and NAT helpers
206 KCONFIG:=$(KCONFIG_IPT_NATHELPER_EXTRA)
207 FILES:=$(foreach mod,$(IPT_NATHELPER_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
208 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_NATHELPER_EXTRA-m)))
209 $(call AddDepends/ipt,+kmod-ipt-nat +kmod-textsearch)
210 endef
211
212 define KernelPackage/ipt-nathelper-extra/description
213 Extra Netfilter (IPv4) Conntrack and NAT helpers
214 Includes:
215 - amanda
216 - h323
217 - mms
218 - pptp
219 - proto_gre
220 - rtsp
221 - sip
222 - snmp_basic
223 endef
224
225 $(eval $(call KernelPackage,ipt-nathelper-extra))
226
227
228 define KernelPackage/ipt-queue
229 TITLE:=Module for user-space packet queueing
230 KCONFIG:=$(KCONFIG_IPT_QUEUE)
231 FILES:=$(foreach mod,$(IPT_QUEUE-m),$(LINUX_DIR)/net/$(mod).ko)
232 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_QUEUE-m)))
233 $(call AddDepends/ipt)
234 endef
235
236 define KernelPackage/ipt-queue/description
237 Netfilter (IPv4) module for user-space packet queueing
238 Includes:
239 - QUEUE
240 endef
241
242 $(eval $(call KernelPackage,ipt-queue))
243
244
245 define KernelPackage/ipt-ulog
246 TITLE:=Module for user-space packet logging
247 KCONFIG:=$(KCONFIG_IPT_ULOG)
248 FILES:=$(foreach mod,$(IPT_ULOG-m),$(LINUX_DIR)/net/$(mod).ko)
249 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_ULOG-m)))
250 $(call AddDepends/ipt)
251 endef
252
253 define KernelPackage/ipt-ulog/description
254 Netfilter (IPv4) module for user-space packet logging
255 Includes:
256 - ULOG
257 endef
258
259 $(eval $(call KernelPackage,ipt-ulog))
260
261
262 define KernelPackage/ipt-debug
263 TITLE:=Module for debugging/development
264 KCONFIG:=$(KCONFIG_IPT_DEBUG)
265 DEFAULT:=n
266 FILES:=$(foreach mod,$(IPT_DEBUG-m),$(LINUX_DIR)/net/$(mod).ko)
267 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_DEBUG-m)))
268 $(call AddDepends/ipt)
269 endef
270
271 define KernelPackage/ipt-debug/description
272 Netfilter modules for debugging/development of the firewall
273 Includes:
274 - TRACE
275 endef
276
277 $(eval $(call KernelPackage,ipt-debug))
278
279
280 define KernelPackage/ipt-led
281 TITLE:=Module to trigger a LED with a Netfilter rule
282 KCONFIG:=$(KCONFIG_IPT_LED)
283 FILES:=$(foreach mod,$(IPT_LED-m),$(LINUX_DIR)/net/$(mod).ko)
284 AUTOLOAD:=$(call AutoLoad,61,$(notdir $(IPT_LED-m)))
285 $(call AddDepends/ipt)
286 endef
287
288 define KernelPackage/ipt-led/description
289 Netfilter target to trigger a LED when a network packet is matched.
290 endef
291
292 $(eval $(call KernelPackage,ipt-led))
293
294 define KernelPackage/ipt-tproxy
295 TITLE:=Transparent proxying support
296 DEPENDS+=+IPV6:kmod-ipv6
297 KCONFIG:= \
298 CONFIG_NETFILTER_TPROXY \
299 CONFIG_NETFILTER_XT_MATCH_SOCKET \
300 CONFIG_NETFILTER_XT_TARGET_TPROXY
301 FILES:= \
302 $(LINUX_DIR)/net/netfilter/nf_tproxy_core.ko \
303 $(foreach mod,$(IPT_TPROXY-m),$(LINUX_DIR)/net/$(mod).ko)
304 AUTOLOAD:=$(call AutoLoad,50,$(notdir nf_tproxy_core $(IPT_TPROXY-m)))
305 $(call AddDepends/ipt)
306 endef
307
308 define KernelPackage/ipt-tproxy/description
309 Kernel modules for Transparent Proxying
310 endef
311
312 $(eval $(call KernelPackage,ipt-tproxy))
313
314
315 define KernelPackage/ipt-iprange
316 TITLE:=Module for matching ip ranges
317 KCONFIG:=$(KCONFIG_IPT_IPRANGE)
318 FILES:=$(foreach mod,$(IPT_IPRANGE-m),$(LINUX_DIR)/net/$(mod).ko)
319 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_IPRANGE-m)))
320 $(call AddDepends/ipt)
321 endef
322
323 define KernelPackage/ipt-iprange/description
324 Netfilter (IPv4) module for matching ip ranges
325 Includes:
326 - iprange
327 endef
328
329 $(eval $(call KernelPackage,ipt-iprange))
330
331
332 define KernelPackage/ipt-extra
333 TITLE:=Extra modules
334 KCONFIG:=$(KCONFIG_IPT_EXTRA)
335 FILES:=$(foreach mod,$(IPT_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
336 AUTOLOAD:=$(call AutoLoad,45,$(notdir $(IPT_EXTRA-m)))
337 $(call AddDepends/ipt)
338 endef
339
340 define KernelPackage/ipt-extra/description
341 Other Netfilter (IPv4) kernel modules
342 Includes:
343 - owner
344 - physdev (if bridge support was enabled in kernel)
345 - pkttype
346 - quota
347 endef
348
349 $(eval $(call KernelPackage,ipt-extra))
350
351
352 define KernelPackage/ip6tables
353 SUBMENU:=$(NF_MENU)
354 TITLE:=IPv6 modules
355 DEPENDS:=+kmod-ipv6
356 KCONFIG:=$(KCONFIG_IPT_IPV6)
357 FILES:=$(foreach mod,$(IPT_IPV6-m),$(LINUX_DIR)/net/$(mod).ko)
358 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(IPT_IPV6-m)))
359 endef
360
361 define KernelPackage/ip6tables/description
362 Netfilter IPv6 firewalling support
363 endef
364
365 $(eval $(call KernelPackage,ip6tables))
366
367
368 define KernelPackage/arptables
369 SUBMENU:=$(NF_MENU)
370 TITLE:=ARP firewalling modules
371 FILES:=$(LINUX_DIR)/net/ipv4/netfilter/arp*.ko
372 KCONFIG:=CONFIG_IP_NF_ARPTABLES \
373 CONFIG_IP_NF_ARPFILTER \
374 CONFIG_IP_NF_ARP_MANGLE
375 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(patsubst %.ko,%,$(wildcard $(LINUX_DIR)/net/ipv4/netfilter/arp*.ko))))
376 endef
377
378 define KernelPackage/arptables/description
379 Kernel modules for ARP firewalling
380 endef
381
382 $(eval $(call KernelPackage,arptables))
383
384
385 define KernelPackage/ebtables
386 SUBMENU:=$(NF_MENU)
387 TITLE:=Bridge firewalling modules
388 FILES:=$(foreach mod,$(EBTABLES-m),$(LINUX_DIR)/net/$(mod).ko)
389 KCONFIG:=CONFIG_BRIDGE_NETFILTER=y \
390 $(KCONFIG_EBTABLES)
391 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(EBTABLES-m)))
392 endef
393
394 define KernelPackage/ebtables/description
395 ebtables is a general, extensible frame/packet identification
396 framework. It provides you to do Ethernet
397 filtering/NAT/brouting on the Ethernet bridge.
398 endef
399
400 $(eval $(call KernelPackage,ebtables))
401
402
403 define AddDepends/ebtables
404 SUBMENU:=$(NF_MENU)
405 DEPENDS+=kmod-ebtables $(1)
406 endef
407
408
409 define KernelPackage/ebtables-ipv4
410 TITLE:=ebtables: IPv4 support
411 FILES:=$(foreach mod,$(EBTABLES_IP4-m),$(LINUX_DIR)/net/$(mod).ko)
412 KCONFIG:=$(KCONFIG_EBTABLES_IP4)
413 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(EBTABLES_IP4-m)))
414 $(call AddDepends/ebtables)
415 endef
416
417 define KernelPackage/ebtables-ipv4/description
418 This option adds the IPv4 support to ebtables, which allows basic
419 IPv4 header field filtering, ARP filtering as well as SNAT, DNAT targets.
420 endef
421
422 $(eval $(call KernelPackage,ebtables-ipv4))
423
424
425 define KernelPackage/ebtables-ipv6
426 TITLE:=ebtables: IPv6 support
427 FILES:=$(foreach mod,$(EBTABLES_IP6-m),$(LINUX_DIR)/net/$(mod).ko)
428 KCONFIG:=$(KCONFIG_EBTABLES_IP6)
429 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(EBTABLES_IP6-m)))
430 $(call AddDepends/ebtables)
431 endef
432
433 define KernelPackage/ebtables-ipv6/description
434 This option adds the IPv6 support to ebtables, which allows basic
435 IPv6 header field filtering and target support.
436 endef
437
438 $(eval $(call KernelPackage,ebtables-ipv6))
439
440
441 define KernelPackage/ebtables-watchers
442 TITLE:=ebtables: watchers support
443 FILES:=$(foreach mod,$(EBTABLES_WATCHERS-m),$(LINUX_DIR)/net/$(mod).ko)
444 KCONFIG:=$(KCONFIG_EBTABLES_WATCHERS)
445 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(EBTABLES_WATCHERS-m)))
446 $(call AddDepends/ebtables)
447 endef
448
449 define KernelPackage/ebtables-watchers/description
450 This option adds the log watchers, that you can use in any rule
451 in any ebtables table.
452 endef
453
454 $(eval $(call KernelPackage,ebtables-watchers))
455
456
457 define KernelPackage/nfnetlink
458 SUBMENU:=$(NF_MENU)
459 TITLE:=Netlink-based userspace interface
460 DEPENDS:=+kmod-ipt-core
461 FILES:=$(LINUX_DIR)/net/netfilter/nfnetlink.ko
462 KCONFIG:=CONFIG_NETFILTER_NETLINK
463 AUTOLOAD:=$(call AutoLoad,48,nfnetlink)
464 endef
465
466 define KernelPackage/nfnetlink/description
467 Kernel modules support for a netlink-based userspace interface
468 endef
469
470 $(eval $(call KernelPackage,nfnetlink))
471
472
473 define AddDepends/nfnetlink
474 SUBMENU:=$(NF_MENU)
475 DEPENDS+=+kmod-nfnetlink $(1)
476 endef
477
478
479 define KernelPackage/nfnetlink-log
480 TITLE:=Netfilter LOG over NFNETLINK interface
481 FILES:=$(LINUX_DIR)/net/netfilter/nfnetlink_log.ko
482 KCONFIG:=CONFIG_NETFILTER_NETLINK_LOG
483 AUTOLOAD:=$(call AutoLoad,48,nfnetlink_log)
484 $(call AddDepends/nfnetlink)
485 endef
486
487 define KernelPackage/nfnetlink-log/description
488 Kernel modules support for logging packets via NFNETLINK
489 endef
490
491 $(eval $(call KernelPackage,nfnetlink-log))
492
493
494 define KernelPackage/nfnetlink-queue
495 TITLE:=Netfilter QUEUE over NFNETLINK interface
496 FILES:=$(LINUX_DIR)/net/netfilter/nfnetlink_queue.ko
497 KCONFIG:=CONFIG_NETFILTER_NETLINK_QUEUE
498 AUTOLOAD:=$(call AutoLoad,48,nfnetlink_queue)
499 $(call AddDepends/nfnetlink)
500 endef
501
502 define KernelPackage/nfnetlink-queue/description
503 Kernel modules support for queueing packets via NFNETLINK
504 endef
505
506 $(eval $(call KernelPackage,nfnetlink-queue))
507
508
509 define KernelPackage/nf-conntrack-netlink
510 TITLE:=Connection tracking netlink interface
511 FILES:=$(LINUX_DIR)/net/netfilter/nf_conntrack_netlink.ko
512 KCONFIG:=CONFIG_NF_CT_NETLINK
513 AUTOLOAD:=$(call AutoLoad,49,nf_conntrack_netlink)
514 $(call AddDepends/nfnetlink,+kmod-ipt-conntrack)
515 endef
516
517 define KernelPackage/nf-conntrack-netlink/description
518 Kernel modules support for a netlink-based connection tracking
519 userspace interface
520 endef
521
522 $(eval $(call KernelPackage,nf-conntrack-netlink))
523
524 define KernelPackage/ipt-hashlimit
525 SUBMENU:=$(NF_MENU)
526 TITLE:=Netfilter hashlimit match
527 KCONFIG:=$(KCONFIG_IPT_HASHLIMIT)
528 FILES:=$(LINUX_DIR)/net/netfilter/xt_hashlimit.ko
529 AUTOLOAD:=$(call AutoLoad,50,xt_hashlimit)
530 $(call KernelPackage/ipt)
531 endef
532
533 define KernelPackage/ipt-hashlimit/description
534 Kernel modules support for the hashlimit bucket match module
535 endef
536
537 $(eval $(call KernelPackage,ipt-hashlimit))
This page took 0.058908 seconds and 3 git commands to generate.