a25274efce4c830d39a01bd131a26fc1f8b5be52
[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  - layer7
175  - string
176 endef
177
178 $(eval $(call KernelPackage,ipt-filter))
179
180
181 define KernelPackage/ipt-ipopt
182   TITLE:=Modules for matching/changing IP packet options
183   KCONFIG:=$(KCONFIG_IPT_IPOPT)
184   FILES:=$(foreach mod,$(IPT_IPOPT-m),$(LINUX_DIR)/net/$(mod).ko)
185   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_IPOPT-m)))
186   $(call AddDepends/ipt)
187 endef
188
189 define KernelPackage/ipt-ipopt/description
190  Netfilter (IPv4) modules for matching/changing IP packet options
191  Includes:
192  - CLASSIFY
193  - dscp/DSCP
194  - ecn/ECN
195  - hl/HL
196  - length
197  - mark/MARK
198  - statistic
199  - tcpmss
200  - time
201  - ttl/TTL
202  - unclean
203 endef
204
205 $(eval $(call KernelPackage,ipt-ipopt))
206
207
208 define KernelPackage/ipt-ipsec
209   TITLE:=Modules for matching IPSec packets
210   KCONFIG:=$(KCONFIG_IPT_IPSEC)
211   FILES:=$(foreach mod,$(IPT_IPSEC-m),$(LINUX_DIR)/net/$(mod).ko)
212   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_IPSEC-m)))
213   $(call AddDepends/ipt)
214 endef
215
216 define KernelPackage/ipt-ipsec/description
217  Netfilter (IPv4) modules for matching IPSec packets
218  Includes:
219  - ah
220  - esp
221  - policy
222 endef
223
224 $(eval $(call KernelPackage,ipt-ipsec))
225
226
227 define KernelPackage/ipt-nat
228   TITLE:=Basic NAT targets
229   KCONFIG:=$(KCONFIG_IPT_NAT)
230   FILES:=$(foreach mod,$(IPT_NAT-m),$(LINUX_DIR)/net/$(mod).ko)
231   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_NAT-m)))
232   $(call AddDepends/ipt,+kmod-nf-nat)
233 endef
234
235 define KernelPackage/ipt-nat/description
236  Netfilter (IPv4) kernel modules for basic NAT targets
237  Includes:
238  - MASQUERADE
239 endef
240
241 $(eval $(call KernelPackage,ipt-nat))
242
243
244 define KernelPackage/ipt-nat6
245   TITLE:=IPv6 NAT targets
246   KCONFIG:=$(KCONFIG_IPT_NAT6)
247   FILES:=$(foreach mod,$(IPT_NAT6-m),$(LINUX_DIR)/net/$(mod).ko)
248   AUTOLOAD:=$(call AutoLoad,43,$(notdir $(IPT_NAT6-m)))
249   $(call AddDepends/ipt,+kmod-nf-nat6)
250 endef
251
252 define KernelPackage/ipt-nat6/description
253  Netfilter (IPv6) kernel modules for NAT targets
254 endef
255
256 $(eval $(call KernelPackage,ipt-nat6))
257
258
259 define KernelPackage/ipt-nat-extra
260   TITLE:=Extra NAT targets
261   KCONFIG:=$(KCONFIG_IPT_NAT_EXTRA)
262   FILES:=$(foreach mod,$(IPT_NAT_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
263   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_NAT_EXTRA-m)))
264   $(call AddDepends/ipt,+kmod-ipt-nat)
265 endef
266
267 define KernelPackage/ipt-nat-extra/description
268  Netfilter (IPv4) kernel modules for extra NAT targets
269  Includes:
270  - NETMAP
271  - REDIRECT
272 endef
273
274 $(eval $(call KernelPackage,ipt-nat-extra))
275
276
277 define KernelPackage/nf-nathelper
278   SUBMENU:=$(NF_MENU)
279   TITLE:=Basic Conntrack and NAT helpers
280   KCONFIG:=$(KCONFIG_NF_NATHELPER)
281   FILES:=$(foreach mod,$(NF_NATHELPER-m),$(LINUX_DIR)/net/$(mod).ko)
282   AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_NATHELPER-m)))
283   DEPENDS:=+kmod-nf-nat
284 endef
285
286 define KernelPackage/nf-nathelper/description
287  Default Netfilter (IPv4) Conntrack and NAT helpers
288  Includes:
289  - ftp
290  - irc
291  - tftp
292 endef
293
294 $(eval $(call KernelPackage,nf-nathelper))
295
296
297 define KernelPackage/nf-nathelper-extra
298   SUBMENU:=$(NF_MENU)
299   TITLE:=Extra Conntrack and NAT helpers
300   KCONFIG:=$(KCONFIG_NF_NATHELPER_EXTRA)
301   FILES:=$(foreach mod,$(NF_NATHELPER_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
302   AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_NATHELPER_EXTRA-m)))
303   DEPENDS:=+kmod-nf-nat +kmod-lib-textsearch
304 endef
305
306 define KernelPackage/nf-nathelper-extra/description
307  Extra Netfilter (IPv4) Conntrack and NAT helpers
308  Includes:
309  - amanda
310  - h323
311  - mms
312  - pptp
313  - proto_gre
314  - sip
315  - snmp_basic
316  - broadcast
317 endef
318
319 $(eval $(call KernelPackage,nf-nathelper-extra))
320
321
322 define KernelPackage/ipt-queue
323   TITLE:=Module for user-space packet queueing
324   KCONFIG:=$(KCONFIG_IPT_QUEUE)
325   DEPENDS:=@!LINUX_3_6
326   FILES:=$(foreach mod,$(IPT_QUEUE-m),$(LINUX_DIR)/net/$(mod).ko)
327   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_QUEUE-m)))
328   $(call AddDepends/ipt)
329 endef
330
331 define KernelPackage/ipt-queue/description
332  Netfilter (IPv4) module for user-space packet queueing
333  Includes:
334  - QUEUE
335 endef
336
337 $(eval $(call KernelPackage,ipt-queue))
338
339
340 define KernelPackage/ipt-ulog
341   TITLE:=Module for user-space packet logging
342   KCONFIG:=$(KCONFIG_IPT_ULOG)
343   FILES:=$(foreach mod,$(IPT_ULOG-m),$(LINUX_DIR)/net/$(mod).ko)
344   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_ULOG-m)))
345   $(call AddDepends/ipt)
346 endef
347
348 define KernelPackage/ipt-ulog/description
349  Netfilter (IPv4) module for user-space packet logging
350  Includes:
351  - ULOG
352 endef
353
354 $(eval $(call KernelPackage,ipt-ulog))
355
356
357 define KernelPackage/ipt-nflog
358   TITLE:=Module for user-space packet logging
359   KCONFIG:=$(KCONFIG_IPT_NFLOG)
360   FILES:=$(foreach mod,$(IPT_NFLOG-m),$(LINUX_DIR)/net/$(mod).ko)
361   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_NFLOG-m)))
362   $(call AddDepends/ipt,+kmod-nfnetlink-log)
363 endef
364
365 define KernelPackage/ipt-nflog/description
366  Netfilter module for user-space packet logging
367  Includes:
368  - NFLOG
369 endef
370
371 $(eval $(call KernelPackage,ipt-nflog))
372
373
374 define KernelPackage/ipt-nfqueue
375   TITLE:=Module for user-space packet queuing
376   KCONFIG:=$(KCONFIG_IPT_NFQUEUE)
377   FILES:=$(foreach mod,$(IPT_NFQUEUE-m),$(LINUX_DIR)/net/$(mod).ko)
378   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_NFQUEUE-m)))
379   $(call AddDepends/ipt,+kmod-nfnetlink-queue)
380 endef
381
382 define KernelPackage/ipt-nfqueue/description
383  Netfilter module for user-space packet queuing
384  Includes:
385  - NFQUEUE
386 endef
387
388 $(eval $(call KernelPackage,ipt-nfqueue))
389
390
391 define KernelPackage/ipt-debug
392   TITLE:=Module for debugging/development
393   KCONFIG:=$(KCONFIG_IPT_DEBUG)
394   DEFAULT:=n
395   FILES:=$(foreach mod,$(IPT_DEBUG-m),$(LINUX_DIR)/net/$(mod).ko)
396   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_DEBUG-m)))
397   $(call AddDepends/ipt)
398 endef
399
400 define KernelPackage/ipt-debug/description
401  Netfilter modules for debugging/development of the firewall
402  Includes:
403  - TRACE
404 endef
405
406 $(eval $(call KernelPackage,ipt-debug))
407
408
409 define KernelPackage/ipt-led
410   TITLE:=Module to trigger a LED with a Netfilter rule
411   KCONFIG:=$(KCONFIG_IPT_LED)
412   FILES:=$(foreach mod,$(IPT_LED-m),$(LINUX_DIR)/net/$(mod).ko)
413   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_LED-m)))
414   $(call AddDepends/ipt)
415 endef
416
417 define KernelPackage/ipt-led/description
418  Netfilter target to trigger a LED when a network packet is matched.
419 endef
420
421 $(eval $(call KernelPackage,ipt-led))
422
423 define KernelPackage/ipt-tproxy
424   TITLE:=Transparent proxying support
425   DEPENDS+=+kmod-ipt-conntrack +IPV6:kmod-ipv6 +IPV6:kmod-ip6tables
426   KCONFIG:= \
427         CONFIG_NETFILTER_TPROXY \
428         CONFIG_NETFILTER_XT_MATCH_SOCKET \
429         CONFIG_NETFILTER_XT_TARGET_TPROXY
430   FILES:= \
431         $(if $(call kernel_patchver_lt,3.12),$(LINUX_DIR)/net/netfilter/nf_tproxy_core.ko) \
432         $(foreach mod,$(IPT_TPROXY-m),$(LINUX_DIR)/net/$(mod).ko)
433   AUTOLOAD:=$(call AutoProbe,$(notdir nf_tproxy_core $(IPT_TPROXY-m)))
434   $(call AddDepends/ipt)
435 endef
436
437 define KernelPackage/ipt-tproxy/description
438   Kernel modules for Transparent Proxying
439 endef
440
441 $(eval $(call KernelPackage,ipt-tproxy))
442
443 define KernelPackage/ipt-tee
444   TITLE:=TEE support
445   DEPENDS:=+kmod-ipt-conntrack +IPV6:kmod-ipv6
446   KCONFIG:= \
447         CONFIG_NETFILTER_XT_TARGET_TEE
448   FILES:= \
449         $(LINUX_DIR)/net/netfilter/xt_TEE.ko \
450         $(foreach mod,$(IPT_TEE-m),$(LINUX_DIR)/net/$(mod).ko)
451   AUTOLOAD:=$(call AutoProbe,$(notdir nf_tee $(IPT_TEE-m)))
452   $(call AddDepends/ipt)
453 endef
454
455 define KernelPackage/ipt-tee/description
456   Kernel modules for TEE
457 endef
458
459 $(eval $(call KernelPackage,ipt-tee))
460
461
462 define KernelPackage/ipt-u32
463   TITLE:=U32 support
464   KCONFIG:= \
465         CONFIG_NETFILTER_XT_MATCH_U32
466   FILES:= \
467         $(LINUX_DIR)/net/netfilter/xt_u32.ko \
468         $(foreach mod,$(IPT_U32-m),$(LINUX_DIR)/net/$(mod).ko)
469   AUTOLOAD:=$(call AutoProbe,$(notdir nf_tee $(IPT_U32-m)))
470   $(call AddDepends/ipt)
471 endef
472
473 define KernelPackage/ipt-u32/description
474   Kernel modules for U32
475 endef
476
477 $(eval $(call KernelPackage,ipt-u32))
478
479
480 define KernelPackage/ipt-iprange
481   TITLE:=Module for matching ip ranges
482   KCONFIG:=$(KCONFIG_IPT_IPRANGE)
483   FILES:=$(foreach mod,$(IPT_IPRANGE-m),$(LINUX_DIR)/net/$(mod).ko)
484   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_IPRANGE-m)))
485   $(call AddDepends/ipt)
486 endef
487
488 define KernelPackage/ipt-iprange/description
489  Netfilter (IPv4) module for matching ip ranges
490  Includes:
491  - iprange
492 endef
493
494 $(eval $(call KernelPackage,ipt-iprange))
495
496
497 define KernelPackage/ipt-extra
498   TITLE:=Extra modules
499   KCONFIG:=$(KCONFIG_IPT_EXTRA)
500   FILES:=$(foreach mod,$(IPT_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
501   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_EXTRA-m)))
502   $(call AddDepends/ipt)
503 endef
504
505 define KernelPackage/ipt-extra/description
506  Other Netfilter (IPv4) kernel modules
507  Includes:
508  - addrtype
509  - owner
510  - physdev (if bridge support was enabled in kernel)
511  - pkttype
512  - quota
513 endef
514
515 $(eval $(call KernelPackage,ipt-extra))
516
517
518 define KernelPackage/ip6tables
519   SUBMENU:=$(NF_MENU)
520   TITLE:=IPv6 modules
521   DEPENDS:=+kmod-nf-ipt6 +kmod-ipt-core +kmod-ipt-conntrack
522   KCONFIG:=$(KCONFIG_IPT_IPV6)
523   FILES:=$(foreach mod,$(IPT_IPV6-m),$(LINUX_DIR)/net/$(mod).ko)
524   AUTOLOAD:=$(call AutoLoad,42,$(notdir $(IPT_IPV6-m)))
525 endef
526
527 define KernelPackage/ip6tables/description
528  Netfilter IPv6 firewalling support
529 endef
530
531 $(eval $(call KernelPackage,ip6tables))
532
533 define KernelPackage/ip6tables-extra
534   SUBMENU:=$(NF_MENU)
535   TITLE:=Extra IPv6 modules
536   DEPENDS:=+kmod-ip6tables
537   KCONFIG:=$(KCONFIG_IPT_IPV6_EXTRA)
538   FILES:=$(foreach mod,$(IPT_IPV6_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
539   AUTOLOAD:=$(call AutoLoad,43,$(notdir $(IPT_IPV6_EXTRA-m)))
540 endef
541
542 define KernelPackage/ip6tables-extra/description
543  Netfilter IPv6 extra header matching modules
544 endef
545
546 $(eval $(call KernelPackage,ip6tables-extra))
547
548 ARP_MODULES = arp_tables arpt_mangle arptable_filter
549 define KernelPackage/arptables
550   SUBMENU:=$(NF_MENU)
551   TITLE:=ARP firewalling modules
552   DEPENDS:=+kmod-ipt-core
553   FILES:=$(LINUX_DIR)/net/ipv4/netfilter/arp*.ko
554   KCONFIG:=CONFIG_IP_NF_ARPTABLES \
555     CONFIG_IP_NF_ARPFILTER \
556     CONFIG_IP_NF_ARP_MANGLE
557   AUTOLOAD:=$(call AutoProbe,$(ARP_MODULES))
558 endef
559
560 define KernelPackage/arptables/description
561  Kernel modules for ARP firewalling
562 endef
563
564 $(eval $(call KernelPackage,arptables))
565
566
567 define KernelPackage/ebtables
568   SUBMENU:=$(NF_MENU)
569   TITLE:=Bridge firewalling modules
570   DEPENDS:=+kmod-ipt-core +kmod-bridge
571   FILES:=$(foreach mod,$(EBTABLES-m),$(LINUX_DIR)/net/$(mod).ko)
572   KCONFIG:=CONFIG_BRIDGE_NETFILTER=y \
573         $(KCONFIG_EBTABLES)
574   AUTOLOAD:=$(call AutoProbe,$(notdir $(EBTABLES-m)))
575 endef
576
577 define KernelPackage/ebtables/description
578   ebtables is a general, extensible frame/packet identification
579   framework. It provides you to do Ethernet
580   filtering/NAT/brouting on the Ethernet bridge.
581 endef
582
583 $(eval $(call KernelPackage,ebtables))
584
585
586 define AddDepends/ebtables
587   SUBMENU:=$(NF_MENU)
588   DEPENDS+=kmod-ebtables $(1)
589 endef
590
591
592 define KernelPackage/ebtables-ipv4
593   TITLE:=ebtables: IPv4 support
594   FILES:=$(foreach mod,$(EBTABLES_IP4-m),$(LINUX_DIR)/net/$(mod).ko)
595   KCONFIG:=$(KCONFIG_EBTABLES_IP4)
596   AUTOLOAD:=$(call AutoProbe,$(notdir $(EBTABLES_IP4-m)))
597   $(call AddDepends/ebtables)
598 endef
599
600 define KernelPackage/ebtables-ipv4/description
601  This option adds the IPv4 support to ebtables, which allows basic
602  IPv4 header field filtering, ARP filtering as well as SNAT, DNAT targets.
603 endef
604
605 $(eval $(call KernelPackage,ebtables-ipv4))
606
607
608 define KernelPackage/ebtables-ipv6
609   TITLE:=ebtables: IPv6 support
610   FILES:=$(foreach mod,$(EBTABLES_IP6-m),$(LINUX_DIR)/net/$(mod).ko)
611   KCONFIG:=$(KCONFIG_EBTABLES_IP6)
612   AUTOLOAD:=$(call AutoProbe,$(notdir $(EBTABLES_IP6-m)))
613   $(call AddDepends/ebtables)
614 endef
615
616 define KernelPackage/ebtables-ipv6/description
617  This option adds the IPv6 support to ebtables, which allows basic
618  IPv6 header field filtering and target support.
619 endef
620
621 $(eval $(call KernelPackage,ebtables-ipv6))
622
623
624 define KernelPackage/ebtables-watchers
625   TITLE:=ebtables: watchers support
626   FILES:=$(foreach mod,$(EBTABLES_WATCHERS-m),$(LINUX_DIR)/net/$(mod).ko)
627   KCONFIG:=$(KCONFIG_EBTABLES_WATCHERS)
628   AUTOLOAD:=$(call AutoProbe,$(notdir $(EBTABLES_WATCHERS-m)))
629   $(call AddDepends/ebtables)
630 endef
631
632 define KernelPackage/ebtables-watchers/description
633  This option adds the log watchers, that you can use in any rule
634  in any ebtables table.
635 endef
636
637 $(eval $(call KernelPackage,ebtables-watchers))
638
639
640 define KernelPackage/nfnetlink
641   SUBMENU:=$(NF_MENU)
642   TITLE:=Netlink-based userspace interface
643   FILES:=$(foreach mod,$(NFNETLINK-m),$(LINUX_DIR)/net/$(mod).ko)
644   KCONFIG:=$(KCONFIG_NFNETLINK)
645   AUTOLOAD:=$(call AutoProbe,$(notdir $(NFNETLINK-m)))
646 endef
647
648 define KernelPackage/nfnetlink/description
649  Kernel modules support for a netlink-based userspace interface
650 endef
651
652 $(eval $(call KernelPackage,nfnetlink))
653
654
655 define AddDepends/nfnetlink
656   SUBMENU:=$(NF_MENU)
657   DEPENDS+=+kmod-nfnetlink $(1)
658 endef
659
660
661 define KernelPackage/nfnetlink-log
662   TITLE:=Netfilter LOG over NFNETLINK interface
663   FILES:=$(foreach mod,$(NFNETLINK_LOG-m),$(LINUX_DIR)/net/$(mod).ko)
664   KCONFIG:=$(KCONFIG_NFNETLINK_LOG)
665   AUTOLOAD:=$(call AutoProbe,$(notdir $(NFNETLINK_LOG-m)))
666   $(call AddDepends/nfnetlink)
667 endef
668
669 define KernelPackage/nfnetlink-log/description
670  Kernel modules support for logging packets via NFNETLINK
671  Includes:
672  - NFLOG
673 endef
674
675 $(eval $(call KernelPackage,nfnetlink-log))
676
677
678 define KernelPackage/nfnetlink-queue
679   TITLE:=Netfilter QUEUE over NFNETLINK interface
680   FILES:=$(foreach mod,$(NFNETLINK_QUEUE-m),$(LINUX_DIR)/net/$(mod).ko)
681   KCONFIG:=$(KCONFIG_NFNETLINK_QUEUE)
682   AUTOLOAD:=$(call AutoProbe,$(notdir $(NFNETLINK_QUEUE-m)))
683   $(call AddDepends/nfnetlink)
684 endef
685
686 define KernelPackage/nfnetlink-queue/description
687  Kernel modules support for queueing packets via NFNETLINK
688  Includes:
689  - NFQUEUE
690 endef
691
692 $(eval $(call KernelPackage,nfnetlink-queue))
693
694
695 define KernelPackage/nf-conntrack-netlink
696   TITLE:=Connection tracking netlink interface
697   FILES:=$(LINUX_DIR)/net/netfilter/nf_conntrack_netlink.ko
698   KCONFIG:=CONFIG_NF_CT_NETLINK
699   AUTOLOAD:=$(call AutoProbe,nf_conntrack_netlink)
700   $(call AddDepends/nfnetlink,+kmod-ipt-conntrack)
701 endef
702
703 define KernelPackage/nf-conntrack-netlink/description
704  Kernel modules support for a netlink-based connection tracking
705  userspace interface
706 endef
707
708 $(eval $(call KernelPackage,nf-conntrack-netlink))
709
710 define KernelPackage/ipt-hashlimit
711   SUBMENU:=$(NF_MENU)
712   TITLE:=Netfilter hashlimit match
713   DEPENDS:=+kmod-ipt-core
714   KCONFIG:=$(KCONFIG_IPT_HASHLIMIT)
715   FILES:=$(LINUX_DIR)/net/netfilter/xt_hashlimit.ko
716   AUTOLOAD:=$(call AutoProbe,xt_hashlimit)
717   $(call KernelPackage/ipt)
718 endef
719
720 define KernelPackage/ipt-hashlimit/description
721  Kernel modules support for the hashlimit bucket match module
722 endef
723
724 $(eval $(call KernelPackage,ipt-hashlimit))
725
726
727 define KernelPackage/nft-core
728   SUBMENU:=$(NF_MENU)
729   TITLE:=Netfilter nf_tables support
730   DEPENDS:=+kmod-nfnetlink +kmod-nf-conntrack6
731   FILES:=$(foreach mod,$(NFT_CORE-m),$(LINUX_DIR)/net/$(mod).ko)
732   AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_CORE-m)))
733   KCONFIG:= \
734         CONFIG_NETFILTER=y \
735         CONFIG_NETFILTER_ADVANCED=y \
736         CONFIG_NFT_COMPAT=n \
737         CONFIG_NFT_QUEUE=n \
738         CONFIG_NF_TABLES_ARP=n \
739         CONFIG_NF_TABLES_BRIDGE=n \
740         $(KCONFIG_NFT_CORE)
741 endef
742
743 define KernelPackage/nft-core/description
744  Kernel module support for nftables
745 endef
746
747 $(eval $(call KernelPackage,nft-core))
748
749
750 define KernelPackage/nft-nat
751   SUBMENU:=$(NF_MENU)
752   TITLE:=Netfilter nf_tables NAT support
753   DEPENDS:=+kmod-nft-core +kmod-nf-nat
754   FILES:=$(foreach mod,$(NFT_NAT-m),$(LINUX_DIR)/net/$(mod).ko)
755   AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_NAT-m)))
756   KCONFIG:=$(KCONFIG_NFT_NAT)
757 endef
758
759 $(eval $(call KernelPackage,nft-nat))
760
761
762 define KernelPackage/nft-nat6
763   SUBMENU:=$(NF_MENU)
764   TITLE:=Netfilter nf_tables IPv6-NAT support
765   DEPENDS:=+kmod-nft-core +kmod-nf-nat6
766   FILES:=$(foreach mod,$(NFT_NAT6-m),$(LINUX_DIR)/net/$(mod).ko)
767   AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_NAT6-m)))
768   KCONFIG:=$(KCONFIG_NFT_NAT6)
769 endef
770
771 $(eval $(call KernelPackage,nft-nat6))
772