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