kernel: finally remove layer7 filter support
[openwrt/openwrt.git] / package / kernel / linux / 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
14 define KernelPackage/nf-ipt
15 SUBMENU:=$(NF_MENU)
16 TITLE:=Iptables core
17 KCONFIG:= \
18 CONFIG_NETFILTER=y \
19 CONFIG_NETFILTER_ADVANCED=y \
20 $(KCONFIG_NF_IPT)
21 FILES:=$(foreach mod,$(NF_IPT-m),$(LINUX_DIR)/net/$(mod).ko)
22 AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_IPT-m)))
23 endef
24
25 $(eval $(call KernelPackage,nf-ipt))
26
27
28 define KernelPackage/nf-ipt6
29 SUBMENU:=$(NF_MENU)
30 TITLE:=Ip6tables core
31 KCONFIG:=$(KCONFIG_NF_IPT6)
32 FILES:=$(foreach mod,$(NF_IPT6-m),$(LINUX_DIR)/net/$(mod).ko)
33 AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_IPT6-m)))
34 DEPENDS:=+kmod-nf-ipt +kmod-nf-conntrack6
35 endef
36
37 $(eval $(call KernelPackage,nf-ipt6))
38
39
40
41 define KernelPackage/ipt-core
42 SUBMENU:=$(NF_MENU)
43 TITLE:=Iptables core
44 KCONFIG:=$(KCONFIG_IPT_CORE)
45 FILES:=$(foreach mod,$(IPT_CORE-m),$(LINUX_DIR)/net/$(mod).ko)
46 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_CORE-m)))
47 DEPENDS:=+kmod-nf-ipt
48 endef
49
50 define KernelPackage/ipt-core/description
51 Netfilter core kernel modules
52 Includes:
53 - comment
54 - limit
55 - LOG
56 - mac
57 - multiport
58 - REJECT
59 - TCPMSS
60 endef
61
62 $(eval $(call KernelPackage,ipt-core))
63
64
65 define KernelPackage/nf-conntrack
66 SUBMENU:=$(NF_MENU)
67 TITLE:=Netfilter connection tracking
68 KCONFIG:= \
69 CONFIG_NETFILTER=y \
70 CONFIG_NETFILTER_ADVANCED=y \
71 $(KCONFIG_NF_CONNTRACK)
72 FILES:=$(foreach mod,$(NF_CONNTRACK-m),$(LINUX_DIR)/net/$(mod).ko)
73 AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_CONNTRACK-m)))
74 endef
75
76 $(eval $(call KernelPackage,nf-conntrack))
77
78
79 define KernelPackage/nf-conntrack6
80 SUBMENU:=$(NF_MENU)
81 TITLE:=Netfilter IPv6 connection tracking
82 KCONFIG:=$(KCONFIG_NF_CONNTRACK6)
83 DEPENDS:=+kmod-ipv6 +kmod-nf-conntrack
84 FILES:=$(foreach mod,$(NF_CONNTRACK6-m),$(LINUX_DIR)/net/$(mod).ko)
85 AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_CONNTRACK6-m)))
86 endef
87
88 $(eval $(call KernelPackage,nf-conntrack6))
89
90
91 define KernelPackage/nf-nat
92 SUBMENU:=$(NF_MENU)
93 TITLE:=Netfilter NAT
94 KCONFIG:=$(KCONFIG_NF_NAT)
95 DEPENDS:=+kmod-nf-conntrack +kmod-nf-ipt
96 FILES:=$(foreach mod,$(NF_NAT-m),$(LINUX_DIR)/net/$(mod).ko)
97 AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_NAT-m)))
98 endef
99
100 $(eval $(call KernelPackage,nf-nat))
101
102
103 define KernelPackage/nf-nat6
104 SUBMENU:=$(NF_MENU)
105 TITLE:=Netfilter IPV6-NAT
106 KCONFIG:=$(KCONFIG_NF_NAT6)
107 DEPENDS:=+kmod-nf-conntrack6 +kmod-nf-ipt6 +kmod-nf-nat
108 FILES:=$(foreach mod,$(NF_NAT6-m),$(LINUX_DIR)/net/$(mod).ko)
109 AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_NAT6-m)))
110 endef
111
112 $(eval $(call KernelPackage,nf-nat6))
113
114
115 define AddDepends/ipt
116 SUBMENU:=$(NF_MENU)
117 DEPENDS+= +kmod-ipt-core $(1)
118 endef
119
120
121 define KernelPackage/ipt-conntrack
122 TITLE:=Basic connection tracking modules
123 KCONFIG:=$(KCONFIG_IPT_CONNTRACK)
124 FILES:=$(foreach mod,$(IPT_CONNTRACK-m),$(LINUX_DIR)/net/$(mod).ko)
125 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_CONNTRACK-m)))
126 $(call AddDepends/ipt,+kmod-nf-conntrack)
127 endef
128
129 define KernelPackage/ipt-conntrack/description
130 Netfilter (IPv4) kernel modules for connection tracking
131 Includes:
132 - conntrack
133 - defrag
134 - iptables_raw
135 - NOTRACK
136 - state
137 endef
138
139 $(eval $(call KernelPackage,ipt-conntrack))
140
141
142 define KernelPackage/ipt-conntrack-extra
143 TITLE:=Extra connection tracking modules
144 KCONFIG:=$(KCONFIG_IPT_CONNTRACK_EXTRA)
145 FILES:=$(foreach mod,$(IPT_CONNTRACK_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
146 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_CONNTRACK_EXTRA-m)))
147 $(call AddDepends/ipt,+kmod-ipt-conntrack)
148 endef
149
150 define KernelPackage/ipt-conntrack-extra/description
151 Netfilter (IPv4) extra kernel modules for connection tracking
152 Includes:
153 - connbytes
154 - connmark/CONNMARK
155 - conntrack
156 - helper
157 - recent
158 endef
159
160 $(eval $(call KernelPackage,ipt-conntrack-extra))
161
162
163 define KernelPackage/ipt-filter
164 TITLE:=Modules for packet content inspection
165 KCONFIG:=$(KCONFIG_IPT_FILTER)
166 FILES:=$(foreach mod,$(IPT_FILTER-m),$(LINUX_DIR)/net/$(mod).ko)
167 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_FILTER-m)))
168 $(call AddDepends/ipt,+kmod-lib-textsearch +kmod-ipt-conntrack)
169 endef
170
171 define KernelPackage/ipt-filter/description
172 Netfilter (IPv4) kernel modules for packet content inspection
173 Includes:
174 - string
175 endef
176
177 $(eval $(call KernelPackage,ipt-filter))
178
179
180 define KernelPackage/ipt-ipopt
181 TITLE:=Modules for matching/changing IP packet options
182 KCONFIG:=$(KCONFIG_IPT_IPOPT)
183 FILES:=$(foreach mod,$(IPT_IPOPT-m),$(LINUX_DIR)/net/$(mod).ko)
184 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_IPOPT-m)))
185 $(call AddDepends/ipt)
186 endef
187
188 define KernelPackage/ipt-ipopt/description
189 Netfilter (IPv4) modules for matching/changing IP packet options
190 Includes:
191 - CLASSIFY
192 - dscp/DSCP
193 - ecn/ECN
194 - hl/HL
195 - length
196 - mark/MARK
197 - statistic
198 - tcpmss
199 - time
200 - ttl/TTL
201 - unclean
202 endef
203
204 $(eval $(call KernelPackage,ipt-ipopt))
205
206
207 define KernelPackage/ipt-ipsec
208 TITLE:=Modules for matching IPSec packets
209 KCONFIG:=$(KCONFIG_IPT_IPSEC)
210 FILES:=$(foreach mod,$(IPT_IPSEC-m),$(LINUX_DIR)/net/$(mod).ko)
211 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_IPSEC-m)))
212 $(call AddDepends/ipt)
213 endef
214
215 define KernelPackage/ipt-ipsec/description
216 Netfilter (IPv4) modules for matching IPSec packets
217 Includes:
218 - ah
219 - esp
220 - policy
221 endef
222
223 $(eval $(call KernelPackage,ipt-ipsec))
224
225 IPSET_MODULES:= \
226 ipset/ip_set \
227 ipset/ip_set_bitmap_ip \
228 ipset/ip_set_bitmap_ipmac \
229 ipset/ip_set_bitmap_port \
230 ipset/ip_set_hash_ip \
231 ipset/ip_set_hash_ipmark \
232 ipset/ip_set_hash_ipport \
233 ipset/ip_set_hash_ipportip \
234 ipset/ip_set_hash_ipportnet \
235 ipset/ip_set_hash_mac \
236 ipset/ip_set_hash_netportnet \
237 ipset/ip_set_hash_net \
238 ipset/ip_set_hash_netnet \
239 ipset/ip_set_hash_netport \
240 ipset/ip_set_hash_netiface \
241 ipset/ip_set_list_set \
242 xt_set
243
244 define KernelPackage/ipt-ipset
245 SUBMENU:=Netfilter Extensions
246 TITLE:=IPset netfilter modules
247 DEPENDS+= +kmod-ipt-core +kmod-nfnetlink
248 KCONFIG:= \
249 CONFIG_IP_SET \
250 CONFIG_IP_SET_MAX=256 \
251 CONFIG_NETFILTER_XT_SET \
252 CONFIG_IP_SET_BITMAP_IP \
253 CONFIG_IP_SET_BITMAP_IPMAC \
254 CONFIG_IP_SET_BITMAP_PORT \
255 CONFIG_IP_SET_HASH_IP \
256 CONFIG_IP_SET_HASH_IPMARK \
257 CONFIG_IP_SET_HASH_IPPORT \
258 CONFIG_IP_SET_HASH_IPPORTIP \
259 CONFIG_IP_SET_HASH_IPPORTNET \
260 CONFIG_IP_SET_HASH_MAC \
261 CONFIG_IP_SET_HASH_NET \
262 CONFIG_IP_SET_HASH_NETNET \
263 CONFIG_IP_SET_HASH_NETIFACE \
264 CONFIG_IP_SET_HASH_NETPORT \
265 CONFIG_IP_SET_HASH_NETPORTNET \
266 CONFIG_IP_SET_LIST_SET \
267 CONFIG_NET_EMATCH_IPSET=n
268 FILES:=$(foreach mod,$(IPSET_MODULES),$(LINUX_DIR)/net/netfilter/$(mod).ko)
269 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(IPSET_MODULES)))
270 endef
271 $(eval $(call KernelPackage,ipt-ipset))
272
273
274 define KernelPackage/ipt-nat
275 TITLE:=Basic NAT targets
276 KCONFIG:=$(KCONFIG_IPT_NAT)
277 FILES:=$(foreach mod,$(IPT_NAT-m),$(LINUX_DIR)/net/$(mod).ko)
278 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_NAT-m)))
279 $(call AddDepends/ipt,+kmod-nf-nat)
280 endef
281
282 define KernelPackage/ipt-nat/description
283 Netfilter (IPv4) kernel modules for basic NAT targets
284 Includes:
285 - MASQUERADE
286 endef
287
288 $(eval $(call KernelPackage,ipt-nat))
289
290
291 define KernelPackage/ipt-nat6
292 TITLE:=IPv6 NAT targets
293 KCONFIG:=$(KCONFIG_IPT_NAT6)
294 FILES:=$(foreach mod,$(IPT_NAT6-m),$(LINUX_DIR)/net/$(mod).ko)
295 AUTOLOAD:=$(call AutoLoad,43,$(notdir $(IPT_NAT6-m)))
296 $(call AddDepends/ipt,+kmod-nf-nat6)
297 $(call AddDepends/ipt,+kmod-ipt-conntrack)
298 $(call AddDepends/ipt,+kmod-ipt-nat)
299 $(call AddDepends/ipt,+kmod-ip6tables)
300 endef
301
302 define KernelPackage/ipt-nat6/description
303 Netfilter (IPv6) kernel modules for NAT targets
304 endef
305
306 $(eval $(call KernelPackage,ipt-nat6))
307
308
309 define KernelPackage/ipt-nat-extra
310 TITLE:=Extra NAT targets
311 KCONFIG:=$(KCONFIG_IPT_NAT_EXTRA)
312 FILES:=$(foreach mod,$(IPT_NAT_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
313 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_NAT_EXTRA-m)))
314 $(call AddDepends/ipt,+kmod-ipt-nat)
315 endef
316
317 define KernelPackage/ipt-nat-extra/description
318 Netfilter (IPv4) kernel modules for extra NAT targets
319 Includes:
320 - NETMAP
321 - REDIRECT
322 endef
323
324 $(eval $(call KernelPackage,ipt-nat-extra))
325
326
327 define KernelPackage/nf-nathelper
328 SUBMENU:=$(NF_MENU)
329 TITLE:=Basic Conntrack and NAT helpers
330 KCONFIG:=$(KCONFIG_NF_NATHELPER)
331 FILES:=$(foreach mod,$(NF_NATHELPER-m),$(LINUX_DIR)/net/$(mod).ko)
332 AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_NATHELPER-m)))
333 DEPENDS:=+kmod-nf-nat
334 endef
335
336 define KernelPackage/nf-nathelper/description
337 Default Netfilter (IPv4) Conntrack and NAT helpers
338 Includes:
339 - ftp
340 - irc
341 - tftp
342 endef
343
344 $(eval $(call KernelPackage,nf-nathelper))
345
346
347 define KernelPackage/nf-nathelper-extra
348 SUBMENU:=$(NF_MENU)
349 TITLE:=Extra Conntrack and NAT helpers
350 KCONFIG:=$(KCONFIG_NF_NATHELPER_EXTRA)
351 FILES:=$(foreach mod,$(NF_NATHELPER_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
352 AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_NATHELPER_EXTRA-m)))
353 DEPENDS:=+kmod-nf-nat +kmod-lib-textsearch
354 endef
355
356 define KernelPackage/nf-nathelper-extra/description
357 Extra Netfilter (IPv4) Conntrack and NAT helpers
358 Includes:
359 - amanda
360 - h323
361 - mms
362 - pptp
363 - proto_gre
364 - sip
365 - snmp_basic
366 - broadcast
367 endef
368
369 $(eval $(call KernelPackage,nf-nathelper-extra))
370
371
372 define KernelPackage/ipt-ulog
373 TITLE:=Module for user-space packet logging
374 KCONFIG:=$(KCONFIG_IPT_ULOG)
375 FILES:=$(foreach mod,$(IPT_ULOG-m),$(LINUX_DIR)/net/$(mod).ko)
376 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_ULOG-m)))
377 $(call AddDepends/ipt)
378 endef
379
380 define KernelPackage/ipt-ulog/description
381 Netfilter (IPv4) module for user-space packet logging
382 Includes:
383 - ULOG
384 endef
385
386 $(eval $(call KernelPackage,ipt-ulog))
387
388
389 define KernelPackage/ipt-nflog
390 TITLE:=Module for user-space packet logging
391 KCONFIG:=$(KCONFIG_IPT_NFLOG)
392 FILES:=$(foreach mod,$(IPT_NFLOG-m),$(LINUX_DIR)/net/$(mod).ko)
393 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_NFLOG-m)))
394 $(call AddDepends/ipt,+kmod-nfnetlink-log)
395 endef
396
397 define KernelPackage/ipt-nflog/description
398 Netfilter module for user-space packet logging
399 Includes:
400 - NFLOG
401 endef
402
403 $(eval $(call KernelPackage,ipt-nflog))
404
405
406 define KernelPackage/ipt-nfqueue
407 TITLE:=Module for user-space packet queuing
408 KCONFIG:=$(KCONFIG_IPT_NFQUEUE)
409 FILES:=$(foreach mod,$(IPT_NFQUEUE-m),$(LINUX_DIR)/net/$(mod).ko)
410 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_NFQUEUE-m)))
411 $(call AddDepends/ipt,+kmod-nfnetlink-queue)
412 endef
413
414 define KernelPackage/ipt-nfqueue/description
415 Netfilter module for user-space packet queuing
416 Includes:
417 - NFQUEUE
418 endef
419
420 $(eval $(call KernelPackage,ipt-nfqueue))
421
422
423 define KernelPackage/ipt-debug
424 TITLE:=Module for debugging/development
425 KCONFIG:=$(KCONFIG_IPT_DEBUG)
426 DEFAULT:=n
427 FILES:=$(foreach mod,$(IPT_DEBUG-m),$(LINUX_DIR)/net/$(mod).ko)
428 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_DEBUG-m)))
429 $(call AddDepends/ipt)
430 endef
431
432 define KernelPackage/ipt-debug/description
433 Netfilter modules for debugging/development of the firewall
434 Includes:
435 - TRACE
436 endef
437
438 $(eval $(call KernelPackage,ipt-debug))
439
440
441 define KernelPackage/ipt-led
442 TITLE:=Module to trigger a LED with a Netfilter rule
443 KCONFIG:=$(KCONFIG_IPT_LED)
444 FILES:=$(foreach mod,$(IPT_LED-m),$(LINUX_DIR)/net/$(mod).ko)
445 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_LED-m)))
446 $(call AddDepends/ipt)
447 endef
448
449 define KernelPackage/ipt-led/description
450 Netfilter target to trigger a LED when a network packet is matched.
451 endef
452
453 $(eval $(call KernelPackage,ipt-led))
454
455 define KernelPackage/ipt-tproxy
456 TITLE:=Transparent proxying support
457 DEPENDS+=+kmod-ipt-conntrack +IPV6:kmod-ipv6 +IPV6:kmod-ip6tables
458 KCONFIG:= \
459 CONFIG_NETFILTER_TPROXY \
460 CONFIG_NETFILTER_XT_MATCH_SOCKET \
461 CONFIG_NETFILTER_XT_TARGET_TPROXY
462 FILES:= \
463 $(if $(call kernel_patchver_lt,3.12),$(LINUX_DIR)/net/netfilter/nf_tproxy_core.ko) \
464 $(foreach mod,$(IPT_TPROXY-m),$(LINUX_DIR)/net/$(mod).ko)
465 AUTOLOAD:=$(call AutoProbe,$(notdir nf_tproxy_core $(IPT_TPROXY-m)))
466 $(call AddDepends/ipt)
467 endef
468
469 define KernelPackage/ipt-tproxy/description
470 Kernel modules for Transparent Proxying
471 endef
472
473 $(eval $(call KernelPackage,ipt-tproxy))
474
475 define KernelPackage/ipt-tee
476 TITLE:=TEE support
477 DEPENDS:=+kmod-ipt-conntrack +IPV6:kmod-ipv6
478 KCONFIG:= \
479 CONFIG_NETFILTER_XT_TARGET_TEE
480 FILES:= \
481 $(LINUX_DIR)/net/netfilter/xt_TEE.ko \
482 $(foreach mod,$(IPT_TEE-m),$(LINUX_DIR)/net/$(mod).ko)
483 AUTOLOAD:=$(call AutoProbe,$(notdir nf_tee $(IPT_TEE-m)))
484 $(call AddDepends/ipt)
485 endef
486
487 define KernelPackage/ipt-tee/description
488 Kernel modules for TEE
489 endef
490
491 $(eval $(call KernelPackage,ipt-tee))
492
493
494 define KernelPackage/ipt-u32
495 TITLE:=U32 support
496 KCONFIG:= \
497 CONFIG_NETFILTER_XT_MATCH_U32
498 FILES:= \
499 $(LINUX_DIR)/net/netfilter/xt_u32.ko \
500 $(foreach mod,$(IPT_U32-m),$(LINUX_DIR)/net/$(mod).ko)
501 AUTOLOAD:=$(call AutoProbe,$(notdir nf_tee $(IPT_U32-m)))
502 $(call AddDepends/ipt)
503 endef
504
505 define KernelPackage/ipt-u32/description
506 Kernel modules for U32
507 endef
508
509 $(eval $(call KernelPackage,ipt-u32))
510
511
512 define KernelPackage/ipt-iprange
513 TITLE:=Module for matching ip ranges
514 KCONFIG:=$(KCONFIG_IPT_IPRANGE)
515 FILES:=$(foreach mod,$(IPT_IPRANGE-m),$(LINUX_DIR)/net/$(mod).ko)
516 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_IPRANGE-m)))
517 $(call AddDepends/ipt)
518 endef
519
520 define KernelPackage/ipt-iprange/description
521 Netfilter (IPv4) module for matching ip ranges
522 Includes:
523 - iprange
524 endef
525
526 $(eval $(call KernelPackage,ipt-iprange))
527
528 define KernelPackage/ipt-cluster
529 TITLE:=Module for matching cluster
530 KCONFIG:=$(KCONFIG_IPT_CLUSTER)
531 FILES:=$(foreach mod,$(IPT_CLUSTER-m),$(LINUX_DIR)/net/$(mod).ko)
532 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_CLUSTER-m)))
533 $(call AddDepends/ipt)
534 endef
535
536 define KernelPackage/ipt-cluster/description
537 Netfilter (IPv4/IPv6) module for matching cluster
538 This option allows you to build work-load-sharing clusters of
539 network servers/stateful firewalls without having a dedicated
540 load-balancing router/server/switch. Basically, this match returns
541 true when the packet must be handled by this cluster node. Thus,
542 all nodes see all packets and this match decides which node handles
543 what packets. The work-load sharing algorithm is based on source
544 address hashing.
545
546 This module is usable for ipv4 and ipv6.
547
548 To use it also enable iptables-mod-cluster
549
550 see `iptables -m cluster --help` for more information.
551 endef
552
553 $(eval $(call KernelPackage,ipt-cluster))
554
555 define KernelPackage/ipt-clusterip
556 TITLE:=Module for CLUSTERIP
557 KCONFIG:=$(KCONFIG_IPT_CLUSTERIP)
558 FILES:=$(foreach mod,$(IPT_CLUSTERIP-m),$(LINUX_DIR)/net/$(mod).ko)
559 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_CLUSTERIP-m)))
560 $(call AddDepends/ipt,+kmod-nf-conntrack)
561 endef
562
563 define KernelPackage/ipt-clusterip/description
564 Netfilter (IPv4-only) module for CLUSTERIP
565 The CLUSTERIP target allows you to build load-balancing clusters of
566 network servers without having a dedicated load-balancing
567 router/server/switch.
568
569 To use it also enable iptables-mod-clusterip
570
571 see `iptables -j CLUSTERIP --help` for more information.
572 endef
573
574 $(eval $(call KernelPackage,ipt-clusterip))
575
576
577 define KernelPackage/ipt-extra
578 TITLE:=Extra modules
579 KCONFIG:=$(KCONFIG_IPT_EXTRA)
580 FILES:=$(foreach mod,$(IPT_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
581 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_EXTRA-m)))
582 $(call AddDepends/ipt)
583 endef
584
585 define KernelPackage/ipt-extra/description
586 Other Netfilter (IPv4) kernel modules
587 Includes:
588 - addrtype
589 - owner
590 - physdev (if bridge support was enabled in kernel)
591 - pkttype
592 - quota
593 endef
594
595 $(eval $(call KernelPackage,ipt-extra))
596
597
598 define KernelPackage/ip6tables
599 SUBMENU:=$(NF_MENU)
600 TITLE:=IPv6 modules
601 DEPENDS:=+kmod-nf-ipt6 +kmod-ipt-core +kmod-ipt-conntrack
602 KCONFIG:=$(KCONFIG_IPT_IPV6)
603 FILES:=$(foreach mod,$(IPT_IPV6-m),$(LINUX_DIR)/net/$(mod).ko)
604 AUTOLOAD:=$(call AutoLoad,42,$(notdir $(IPT_IPV6-m)))
605 endef
606
607 define KernelPackage/ip6tables/description
608 Netfilter IPv6 firewalling support
609 endef
610
611 $(eval $(call KernelPackage,ip6tables))
612
613 define KernelPackage/ip6tables-extra
614 SUBMENU:=$(NF_MENU)
615 TITLE:=Extra IPv6 modules
616 DEPENDS:=+kmod-ip6tables
617 KCONFIG:=$(KCONFIG_IPT_IPV6_EXTRA)
618 FILES:=$(foreach mod,$(IPT_IPV6_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
619 AUTOLOAD:=$(call AutoLoad,43,$(notdir $(IPT_IPV6_EXTRA-m)))
620 endef
621
622 define KernelPackage/ip6tables-extra/description
623 Netfilter IPv6 extra header matching modules
624 endef
625
626 $(eval $(call KernelPackage,ip6tables-extra))
627
628 ARP_MODULES = arp_tables arpt_mangle arptable_filter
629 define KernelPackage/arptables
630 SUBMENU:=$(NF_MENU)
631 TITLE:=ARP firewalling modules
632 DEPENDS:=+kmod-ipt-core
633 FILES:=$(LINUX_DIR)/net/ipv4/netfilter/arp*.ko
634 KCONFIG:=CONFIG_IP_NF_ARPTABLES \
635 CONFIG_IP_NF_ARPFILTER \
636 CONFIG_IP_NF_ARP_MANGLE
637 AUTOLOAD:=$(call AutoProbe,$(ARP_MODULES))
638 endef
639
640 define KernelPackage/arptables/description
641 Kernel modules for ARP firewalling
642 endef
643
644 $(eval $(call KernelPackage,arptables))
645
646
647 define KernelPackage/ebtables
648 SUBMENU:=$(NF_MENU)
649 TITLE:=Bridge firewalling modules
650 DEPENDS:=+kmod-ipt-core +kmod-bridge
651 FILES:=$(foreach mod,$(EBTABLES-m),$(LINUX_DIR)/net/$(mod).ko)
652 KCONFIG:=CONFIG_BRIDGE_NETFILTER=y \
653 $(KCONFIG_EBTABLES)
654 AUTOLOAD:=$(call AutoProbe,$(notdir $(EBTABLES-m)))
655 endef
656
657 define KernelPackage/ebtables/description
658 ebtables is a general, extensible frame/packet identification
659 framework. It provides you to do Ethernet
660 filtering/NAT/brouting on the Ethernet bridge.
661 endef
662
663 $(eval $(call KernelPackage,ebtables))
664
665
666 define AddDepends/ebtables
667 SUBMENU:=$(NF_MENU)
668 DEPENDS+=kmod-ebtables $(1)
669 endef
670
671
672 define KernelPackage/ebtables-ipv4
673 TITLE:=ebtables: IPv4 support
674 FILES:=$(foreach mod,$(EBTABLES_IP4-m),$(LINUX_DIR)/net/$(mod).ko)
675 KCONFIG:=$(KCONFIG_EBTABLES_IP4)
676 AUTOLOAD:=$(call AutoProbe,$(notdir $(EBTABLES_IP4-m)))
677 $(call AddDepends/ebtables)
678 endef
679
680 define KernelPackage/ebtables-ipv4/description
681 This option adds the IPv4 support to ebtables, which allows basic
682 IPv4 header field filtering, ARP filtering as well as SNAT, DNAT targets.
683 endef
684
685 $(eval $(call KernelPackage,ebtables-ipv4))
686
687
688 define KernelPackage/ebtables-ipv6
689 TITLE:=ebtables: IPv6 support
690 FILES:=$(foreach mod,$(EBTABLES_IP6-m),$(LINUX_DIR)/net/$(mod).ko)
691 KCONFIG:=$(KCONFIG_EBTABLES_IP6)
692 AUTOLOAD:=$(call AutoProbe,$(notdir $(EBTABLES_IP6-m)))
693 $(call AddDepends/ebtables)
694 endef
695
696 define KernelPackage/ebtables-ipv6/description
697 This option adds the IPv6 support to ebtables, which allows basic
698 IPv6 header field filtering and target support.
699 endef
700
701 $(eval $(call KernelPackage,ebtables-ipv6))
702
703
704 define KernelPackage/ebtables-watchers
705 TITLE:=ebtables: watchers support
706 FILES:=$(foreach mod,$(EBTABLES_WATCHERS-m),$(LINUX_DIR)/net/$(mod).ko)
707 KCONFIG:=$(KCONFIG_EBTABLES_WATCHERS)
708 AUTOLOAD:=$(call AutoProbe,$(notdir $(EBTABLES_WATCHERS-m)))
709 $(call AddDepends/ebtables)
710 endef
711
712 define KernelPackage/ebtables-watchers/description
713 This option adds the log watchers, that you can use in any rule
714 in any ebtables table.
715 endef
716
717 $(eval $(call KernelPackage,ebtables-watchers))
718
719
720 define KernelPackage/nfnetlink
721 SUBMENU:=$(NF_MENU)
722 TITLE:=Netlink-based userspace interface
723 FILES:=$(foreach mod,$(NFNETLINK-m),$(LINUX_DIR)/net/$(mod).ko)
724 KCONFIG:=$(KCONFIG_NFNETLINK)
725 AUTOLOAD:=$(call AutoProbe,$(notdir $(NFNETLINK-m)))
726 endef
727
728 define KernelPackage/nfnetlink/description
729 Kernel modules support for a netlink-based userspace interface
730 endef
731
732 $(eval $(call KernelPackage,nfnetlink))
733
734
735 define AddDepends/nfnetlink
736 SUBMENU:=$(NF_MENU)
737 DEPENDS+=+kmod-nfnetlink $(1)
738 endef
739
740
741 define KernelPackage/nfnetlink-log
742 TITLE:=Netfilter LOG over NFNETLINK interface
743 FILES:=$(foreach mod,$(NFNETLINK_LOG-m),$(LINUX_DIR)/net/$(mod).ko)
744 KCONFIG:=$(KCONFIG_NFNETLINK_LOG)
745 AUTOLOAD:=$(call AutoProbe,$(notdir $(NFNETLINK_LOG-m)))
746 $(call AddDepends/nfnetlink)
747 endef
748
749 define KernelPackage/nfnetlink-log/description
750 Kernel modules support for logging packets via NFNETLINK
751 Includes:
752 - NFLOG
753 endef
754
755 $(eval $(call KernelPackage,nfnetlink-log))
756
757
758 define KernelPackage/nfnetlink-queue
759 TITLE:=Netfilter QUEUE over NFNETLINK interface
760 FILES:=$(foreach mod,$(NFNETLINK_QUEUE-m),$(LINUX_DIR)/net/$(mod).ko)
761 KCONFIG:=$(KCONFIG_NFNETLINK_QUEUE)
762 AUTOLOAD:=$(call AutoProbe,$(notdir $(NFNETLINK_QUEUE-m)))
763 $(call AddDepends/nfnetlink)
764 endef
765
766 define KernelPackage/nfnetlink-queue/description
767 Kernel modules support for queueing packets via NFNETLINK
768 Includes:
769 - NFQUEUE
770 endef
771
772 $(eval $(call KernelPackage,nfnetlink-queue))
773
774
775 define KernelPackage/nf-conntrack-netlink
776 TITLE:=Connection tracking netlink interface
777 FILES:=$(LINUX_DIR)/net/netfilter/nf_conntrack_netlink.ko
778 KCONFIG:=CONFIG_NF_CT_NETLINK
779 AUTOLOAD:=$(call AutoProbe,nf_conntrack_netlink)
780 $(call AddDepends/nfnetlink,+kmod-ipt-conntrack)
781 endef
782
783 define KernelPackage/nf-conntrack-netlink/description
784 Kernel modules support for a netlink-based connection tracking
785 userspace interface
786 endef
787
788 $(eval $(call KernelPackage,nf-conntrack-netlink))
789
790 define KernelPackage/ipt-hashlimit
791 SUBMENU:=$(NF_MENU)
792 TITLE:=Netfilter hashlimit match
793 DEPENDS:=+kmod-ipt-core
794 KCONFIG:=$(KCONFIG_IPT_HASHLIMIT)
795 FILES:=$(LINUX_DIR)/net/netfilter/xt_hashlimit.ko
796 AUTOLOAD:=$(call AutoProbe,xt_hashlimit)
797 $(call KernelPackage/ipt)
798 endef
799
800 define KernelPackage/ipt-hashlimit/description
801 Kernel modules support for the hashlimit bucket match module
802 endef
803
804 $(eval $(call KernelPackage,ipt-hashlimit))
805
806
807 define KernelPackage/nft-core
808 SUBMENU:=$(NF_MENU)
809 TITLE:=Netfilter nf_tables support
810 DEPENDS:=+kmod-nfnetlink +kmod-nf-conntrack6
811 FILES:=$(foreach mod,$(NFT_CORE-m),$(LINUX_DIR)/net/$(mod).ko)
812 AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_CORE-m)))
813 KCONFIG:= \
814 CONFIG_NETFILTER=y \
815 CONFIG_NETFILTER_ADVANCED=y \
816 CONFIG_NFT_COMPAT=n \
817 CONFIG_NFT_QUEUE=n \
818 CONFIG_NF_TABLES_ARP=n \
819 CONFIG_NF_TABLES_BRIDGE=n \
820 $(KCONFIG_NFT_CORE)
821 endef
822
823 define KernelPackage/nft-core/description
824 Kernel module support for nftables
825 endef
826
827 $(eval $(call KernelPackage,nft-core))
828
829
830 define KernelPackage/nft-nat
831 SUBMENU:=$(NF_MENU)
832 TITLE:=Netfilter nf_tables NAT support
833 DEPENDS:=+kmod-nft-core +kmod-nf-nat
834 FILES:=$(foreach mod,$(NFT_NAT-m),$(LINUX_DIR)/net/$(mod).ko)
835 AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_NAT-m)))
836 KCONFIG:=$(KCONFIG_NFT_NAT)
837 endef
838
839 $(eval $(call KernelPackage,nft-nat))
840
841
842 define KernelPackage/nft-nat6
843 SUBMENU:=$(NF_MENU)
844 TITLE:=Netfilter nf_tables IPv6-NAT support
845 DEPENDS:=+kmod-nft-core +kmod-nf-nat6
846 FILES:=$(foreach mod,$(NFT_NAT6-m),$(LINUX_DIR)/net/$(mod).ko)
847 AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_NAT6-m)))
848 KCONFIG:=$(KCONFIG_NFT_NAT6)
849 endef
850
851 $(eval $(call KernelPackage,nft-nat6))
852