3 # Copyright (C) 2006-2010 OpenWrt.org
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
9 NF_MENU:=Netfilter Extensions
11 include $(INCLUDE_DIR)/netfilter.mk
14 define KernelPackage/nf-reject
16 TITLE:=Netfilter IPv4 reject support
19 CONFIG_NETFILTER_ADVANCED=y \
21 FILES:=$(foreach mod,$(NF_REJECT-m),$(LINUX_DIR)/net/$(mod).ko)
22 AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_REJECT-m)))
25 $(eval $(call KernelPackage,nf-reject))
28 define KernelPackage/nf-reject6
30 TITLE:=Netfilter IPv6 reject support
33 CONFIG_NETFILTER_ADVANCED=y \
36 FILES:=$(foreach mod,$(NF_REJECT6-m),$(LINUX_DIR)/net/$(mod).ko)
37 AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_REJECT6-m)))
40 $(eval $(call KernelPackage,nf-reject6))
43 define KernelPackage/nf-ipt
46 KCONFIG:=$(KCONFIG_NF_IPT)
47 FILES:=$(foreach mod,$(NF_IPT-m),$(LINUX_DIR)/net/$(mod).ko)
48 AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_IPT-m)))
51 $(eval $(call KernelPackage,nf-ipt))
54 define KernelPackage/nf-ipt6
57 KCONFIG:=$(KCONFIG_NF_IPT6)
58 FILES:=$(foreach mod,$(NF_IPT6-m),$(LINUX_DIR)/net/$(mod).ko)
59 AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_IPT6-m)))
63 $(eval $(call KernelPackage,nf-ipt6))
67 define KernelPackage/ipt-core
70 KCONFIG:=$(KCONFIG_IPT_CORE)
71 FILES:=$(foreach mod,$(IPT_CORE-m),$(LINUX_DIR)/net/$(mod).ko)
72 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_CORE-m)))
73 DEPENDS:=+kmod-nf-reject +kmod-nf-ipt
76 define KernelPackage/ipt-core/description
77 Netfilter core kernel modules
88 $(eval $(call KernelPackage,ipt-core))
91 define KernelPackage/nf-conntrack
93 TITLE:=Netfilter connection tracking
96 CONFIG_NETFILTER_ADVANCED=y \
97 CONFIG_NF_CONNTRACK_MARK=y \
98 CONFIG_NF_CONNTRACK_ZONES=y \
99 $(KCONFIG_NF_CONNTRACK)
100 FILES:=$(foreach mod,$(NF_CONNTRACK-m),$(LINUX_DIR)/net/$(mod).ko)
101 AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_CONNTRACK-m)))
104 $(eval $(call KernelPackage,nf-conntrack))
107 define KernelPackage/nf-conntrack6
109 TITLE:=Netfilter IPv6 connection tracking
110 KCONFIG:=$(KCONFIG_NF_CONNTRACK6)
111 DEPENDS:=@IPV6 +kmod-nf-conntrack
112 FILES:=$(foreach mod,$(NF_CONNTRACK6-m),$(LINUX_DIR)/net/$(mod).ko)
113 AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_CONNTRACK6-m)))
116 $(eval $(call KernelPackage,nf-conntrack6))
119 define KernelPackage/nf-nat
122 KCONFIG:=$(KCONFIG_NF_NAT)
123 DEPENDS:=+kmod-nf-conntrack
124 FILES:=$(foreach mod,$(NF_NAT-m),$(LINUX_DIR)/net/$(mod).ko)
125 AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_NAT-m)))
128 $(eval $(call KernelPackage,nf-nat))
131 define KernelPackage/nf-nat6
133 TITLE:=Netfilter IPV6-NAT
134 KCONFIG:=$(KCONFIG_NF_NAT6)
135 DEPENDS:=+kmod-nf-conntrack6 +kmod-nf-nat
136 FILES:=$(foreach mod,$(NF_NAT6-m),$(LINUX_DIR)/net/$(mod).ko)
137 AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_NAT6-m)))
140 $(eval $(call KernelPackage,nf-nat6))
143 define KernelPackage/nf-flow
145 TITLE:=Netfilter flowtable support
147 CONFIG_NETFILTER_INGRESS=y \
148 CONFIG_NF_FLOW_TABLE \
149 CONFIG_NF_FLOW_TABLE_HW
150 DEPENDS:=+kmod-nf-conntrack @!LINUX_3_18 @!LINUX_4_4 @!LINUX_4_9
152 $(LINUX_DIR)/net/netfilter/nf_flow_table.ko
153 AUTOLOAD:=$(call AutoProbe,nf_flow_table)
156 $(eval $(call KernelPackage,nf-flow))
159 define AddDepends/ipt
161 DEPENDS+= +kmod-ipt-core $(1)
165 define KernelPackage/ipt-conntrack
166 TITLE:=Basic connection tracking modules
167 KCONFIG:=$(KCONFIG_IPT_CONNTRACK)
168 FILES:=$(foreach mod,$(IPT_CONNTRACK-m),$(LINUX_DIR)/net/$(mod).ko)
169 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_CONNTRACK-m)))
170 $(call AddDepends/ipt,+kmod-nf-conntrack)
173 define KernelPackage/ipt-conntrack/description
174 Netfilter (IPv4) kernel modules for connection tracking
183 $(eval $(call KernelPackage,ipt-conntrack))
186 define KernelPackage/ipt-conntrack-extra
187 TITLE:=Extra connection tracking modules
188 KCONFIG:=$(KCONFIG_IPT_CONNTRACK_EXTRA)
189 FILES:=$(foreach mod,$(IPT_CONNTRACK_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
190 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_CONNTRACK_EXTRA-m)))
191 $(call AddDepends/ipt,+kmod-ipt-conntrack)
194 define KernelPackage/ipt-conntrack-extra/description
195 Netfilter (IPv4) extra kernel modules for connection tracking
204 $(eval $(call KernelPackage,ipt-conntrack-extra))
206 define KernelPackage/ipt-conntrack-label
207 TITLE:=Module for handling connection tracking labels
208 KCONFIG:=$(KCONFIG_IPT_CONNTRACK_LABEL)
209 FILES:=$(foreach mod,$(IPT_CONNTRACK_LABEL-m),$(LINUX_DIR)/net/$(mod).ko)
210 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_CONNTRACK_LABEL-m)))
211 $(call AddDepends/ipt,+kmod-ipt-conntrack)
214 define KernelPackage/ipt-conntrack-label/description
215 Netfilter (IPv4) module for handling connection tracking labels
220 $(eval $(call KernelPackage,ipt-conntrack-label))
222 define KernelPackage/ipt-filter
223 TITLE:=Modules for packet content inspection
224 KCONFIG:=$(KCONFIG_IPT_FILTER)
225 FILES:=$(foreach mod,$(IPT_FILTER-m),$(LINUX_DIR)/net/$(mod).ko)
226 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_FILTER-m)))
227 $(call AddDepends/ipt,+kmod-lib-textsearch +kmod-ipt-conntrack)
230 define KernelPackage/ipt-filter/description
231 Netfilter (IPv4) kernel modules for packet content inspection
236 $(eval $(call KernelPackage,ipt-filter))
239 define KernelPackage/ipt-offload
240 TITLE:=Netfilter routing/NAT offload support
241 KCONFIG:=CONFIG_NETFILTER_XT_TARGET_FLOWOFFLOAD
242 FILES:=$(foreach mod,$(IPT_FLOW-m),$(LINUX_DIR)/net/$(mod).ko)
243 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_FLOW-m)))
244 $(call AddDepends/ipt,+kmod-nf-flow)
247 $(eval $(call KernelPackage,ipt-offload))
250 define KernelPackage/ipt-ipopt
251 TITLE:=Modules for matching/changing IP packet options
252 KCONFIG:=$(KCONFIG_IPT_IPOPT)
253 FILES:=$(foreach mod,$(IPT_IPOPT-m),$(LINUX_DIR)/net/$(mod).ko)
254 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_IPOPT-m)))
255 $(call AddDepends/ipt)
258 define KernelPackage/ipt-ipopt/description
259 Netfilter (IPv4) modules for matching/changing IP packet options
274 $(eval $(call KernelPackage,ipt-ipopt))
277 define KernelPackage/ipt-ipsec
278 TITLE:=Modules for matching IPSec packets
279 KCONFIG:=$(KCONFIG_IPT_IPSEC)
280 FILES:=$(foreach mod,$(IPT_IPSEC-m),$(LINUX_DIR)/net/$(mod).ko)
281 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_IPSEC-m)))
282 $(call AddDepends/ipt)
285 define KernelPackage/ipt-ipsec/description
286 Netfilter (IPv4) modules for matching IPSec packets
293 $(eval $(call KernelPackage,ipt-ipsec))
297 ipset/ip_set_bitmap_ip \
298 ipset/ip_set_bitmap_ipmac \
299 ipset/ip_set_bitmap_port \
300 ipset/ip_set_hash_ip \
301 ipset/ip_set_hash_ipmark \
302 ipset/ip_set_hash_ipport \
303 ipset/ip_set_hash_ipportip \
304 ipset/ip_set_hash_ipportnet \
305 ipset/ip_set_hash_mac \
306 ipset/ip_set_hash_netportnet \
307 ipset/ip_set_hash_net \
308 ipset/ip_set_hash_netnet \
309 ipset/ip_set_hash_netport \
310 ipset/ip_set_hash_netiface \
311 ipset/ip_set_list_set \
314 define KernelPackage/ipt-ipset
315 SUBMENU:=Netfilter Extensions
316 TITLE:=IPset netfilter modules
317 DEPENDS+= +kmod-ipt-core +kmod-nfnetlink
320 CONFIG_IP_SET_MAX=256 \
321 CONFIG_NETFILTER_XT_SET \
322 CONFIG_IP_SET_BITMAP_IP \
323 CONFIG_IP_SET_BITMAP_IPMAC \
324 CONFIG_IP_SET_BITMAP_PORT \
325 CONFIG_IP_SET_HASH_IP \
326 CONFIG_IP_SET_HASH_IPMARK \
327 CONFIG_IP_SET_HASH_IPPORT \
328 CONFIG_IP_SET_HASH_IPPORTIP \
329 CONFIG_IP_SET_HASH_IPPORTNET \
330 CONFIG_IP_SET_HASH_MAC \
331 CONFIG_IP_SET_HASH_NET \
332 CONFIG_IP_SET_HASH_NETNET \
333 CONFIG_IP_SET_HASH_NETIFACE \
334 CONFIG_IP_SET_HASH_NETPORT \
335 CONFIG_IP_SET_HASH_NETPORTNET \
336 CONFIG_IP_SET_LIST_SET \
337 CONFIG_NET_EMATCH_IPSET=n
338 FILES:=$(foreach mod,$(IPSET_MODULES),$(LINUX_DIR)/net/netfilter/$(mod).ko)
339 AUTOLOAD:=$(call AutoLoad,49,$(notdir $(IPSET_MODULES)))
341 $(eval $(call KernelPackage,ipt-ipset))
344 define KernelPackage/ipt-nat
345 TITLE:=Basic NAT targets
346 KCONFIG:=$(KCONFIG_IPT_NAT)
347 FILES:=$(foreach mod,$(IPT_NAT-m),$(LINUX_DIR)/net/$(mod).ko)
348 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_NAT-m)))
349 $(call AddDepends/ipt,+kmod-nf-nat)
352 define KernelPackage/ipt-nat/description
353 Netfilter (IPv4) kernel modules for basic NAT targets
358 $(eval $(call KernelPackage,ipt-nat))
361 define KernelPackage/ipt-raw
362 TITLE:=Netfilter IPv4 raw table support
363 KCONFIG:=CONFIG_IP_NF_RAW
364 FILES:=$(LINUX_DIR)/net/ipv4/netfilter/iptable_raw.ko
365 AUTOLOAD:=$(call AutoProbe,iptable_raw)
366 $(call AddDepends/ipt)
369 $(eval $(call KernelPackage,ipt-raw))
372 define KernelPackage/ipt-raw6
373 TITLE:=Netfilter IPv6 raw table support
374 KCONFIG:=CONFIG_IP6_NF_RAW
375 FILES:=$(LINUX_DIR)/net/ipv6/netfilter/ip6table_raw.ko
376 AUTOLOAD:=$(call AutoProbe,ip6table_raw)
377 $(call AddDepends/ipt,+kmod-ip6tables)
380 $(eval $(call KernelPackage,ipt-raw6))
383 define KernelPackage/ipt-nat6
384 TITLE:=IPv6 NAT targets
385 KCONFIG:=$(KCONFIG_IPT_NAT6)
386 FILES:=$(foreach mod,$(IPT_NAT6-m),$(LINUX_DIR)/net/$(mod).ko)
387 AUTOLOAD:=$(call AutoLoad,43,$(notdir $(IPT_NAT6-m)))
388 $(call AddDepends/ipt,+kmod-nf-nat6)
389 $(call AddDepends/ipt,+kmod-ipt-conntrack)
390 $(call AddDepends/ipt,+kmod-ipt-nat)
391 $(call AddDepends/ipt,+kmod-ip6tables)
394 define KernelPackage/ipt-nat6/description
395 Netfilter (IPv6) kernel modules for NAT targets
398 $(eval $(call KernelPackage,ipt-nat6))
401 define KernelPackage/ipt-nat-extra
402 TITLE:=Extra NAT targets
403 KCONFIG:=$(KCONFIG_IPT_NAT_EXTRA)
404 FILES:=$(foreach mod,$(IPT_NAT_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
405 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_NAT_EXTRA-m)))
406 $(call AddDepends/ipt,+kmod-ipt-nat)
409 define KernelPackage/ipt-nat-extra/description
410 Netfilter (IPv4) kernel modules for extra NAT targets
416 $(eval $(call KernelPackage,ipt-nat-extra))
419 define KernelPackage/nf-nathelper
421 TITLE:=Basic Conntrack and NAT helpers
422 KCONFIG:=$(KCONFIG_NF_NATHELPER)
423 FILES:=$(foreach mod,$(NF_NATHELPER-m),$(LINUX_DIR)/net/$(mod).ko)
424 AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_NATHELPER-m)))
425 DEPENDS:=+kmod-nf-nat
428 define KernelPackage/nf-nathelper/description
429 Default Netfilter (IPv4) Conntrack and NAT helpers
434 $(eval $(call KernelPackage,nf-nathelper))
437 define KernelPackage/nf-nathelper-extra
439 TITLE:=Extra Conntrack and NAT helpers
440 KCONFIG:=$(KCONFIG_NF_NATHELPER_EXTRA)
441 FILES:=$(foreach mod,$(NF_NATHELPER_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
442 AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_NATHELPER_EXTRA-m)))
443 DEPENDS:=+kmod-nf-nat +kmod-lib-textsearch
446 define KernelPackage/nf-nathelper-extra/description
447 Extra Netfilter (IPv4) Conntrack and NAT helpers
461 $(eval $(call KernelPackage,nf-nathelper-extra))
464 define KernelPackage/ipt-ulog
465 TITLE:=Module for user-space packet logging
466 KCONFIG:=$(KCONFIG_IPT_ULOG)
467 FILES:=$(foreach mod,$(IPT_ULOG-m),$(LINUX_DIR)/net/$(mod).ko)
468 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_ULOG-m)))
469 $(call AddDepends/ipt)
472 define KernelPackage/ipt-ulog/description
473 Netfilter (IPv4) module for user-space packet logging
478 $(eval $(call KernelPackage,ipt-ulog))
481 define KernelPackage/ipt-nflog
482 TITLE:=Module for user-space packet logging
483 KCONFIG:=$(KCONFIG_IPT_NFLOG)
484 FILES:=$(foreach mod,$(IPT_NFLOG-m),$(LINUX_DIR)/net/$(mod).ko)
485 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_NFLOG-m)))
486 $(call AddDepends/ipt,+kmod-nfnetlink-log)
489 define KernelPackage/ipt-nflog/description
490 Netfilter module for user-space packet logging
495 $(eval $(call KernelPackage,ipt-nflog))
498 define KernelPackage/ipt-nfqueue
499 TITLE:=Module for user-space packet queuing
500 KCONFIG:=$(KCONFIG_IPT_NFQUEUE)
501 FILES:=$(foreach mod,$(IPT_NFQUEUE-m),$(LINUX_DIR)/net/$(mod).ko)
502 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_NFQUEUE-m)))
503 $(call AddDepends/ipt,+kmod-nfnetlink-queue)
506 define KernelPackage/ipt-nfqueue/description
507 Netfilter module for user-space packet queuing
512 $(eval $(call KernelPackage,ipt-nfqueue))
515 define KernelPackage/ipt-debug
516 TITLE:=Module for debugging/development
517 KCONFIG:=$(KCONFIG_IPT_DEBUG)
518 FILES:=$(foreach mod,$(IPT_DEBUG-m),$(LINUX_DIR)/net/$(mod).ko)
519 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_DEBUG-m)))
520 $(call AddDepends/ipt,+kmod-ipt-raw +IPV6:kmod-ipt-raw6)
523 define KernelPackage/ipt-debug/description
524 Netfilter modules for debugging/development of the firewall
529 $(eval $(call KernelPackage,ipt-debug))
532 define KernelPackage/ipt-led
533 TITLE:=Module to trigger a LED with a Netfilter rule
534 KCONFIG:=$(KCONFIG_IPT_LED)
535 FILES:=$(foreach mod,$(IPT_LED-m),$(LINUX_DIR)/net/$(mod).ko)
536 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_LED-m)))
537 $(call AddDepends/ipt)
540 define KernelPackage/ipt-led/description
541 Netfilter target to trigger a LED when a network packet is matched.
544 $(eval $(call KernelPackage,ipt-led))
546 define KernelPackage/ipt-tproxy
547 TITLE:=Transparent proxying support
548 DEPENDS+=+kmod-ipt-conntrack +IPV6:kmod-nf-conntrack6 +IPV6:kmod-ip6tables
550 CONFIG_NETFILTER_XT_MATCH_SOCKET \
551 CONFIG_NETFILTER_XT_TARGET_TPROXY
553 $(foreach mod,$(IPT_TPROXY-m),$(LINUX_DIR)/net/$(mod).ko)
554 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_TPROXY-m)))
555 $(call AddDepends/ipt)
558 define KernelPackage/ipt-tproxy/description
559 Kernel modules for Transparent Proxying
562 $(eval $(call KernelPackage,ipt-tproxy))
564 define KernelPackage/ipt-tee
566 DEPENDS:=+kmod-ipt-conntrack
568 CONFIG_NETFILTER_XT_TARGET_TEE
570 $(LINUX_DIR)/net/netfilter/xt_TEE.ko \
571 $(foreach mod,$(IPT_TEE-m),$(LINUX_DIR)/net/$(mod).ko)
572 AUTOLOAD:=$(call AutoProbe,$(notdir nf_tee $(IPT_TEE-m)))
573 $(call AddDepends/ipt)
576 define KernelPackage/ipt-tee/description
577 Kernel modules for TEE
580 $(eval $(call KernelPackage,ipt-tee))
583 define KernelPackage/ipt-u32
586 CONFIG_NETFILTER_XT_MATCH_U32
588 $(LINUX_DIR)/net/netfilter/xt_u32.ko \
589 $(foreach mod,$(IPT_U32-m),$(LINUX_DIR)/net/$(mod).ko)
590 AUTOLOAD:=$(call AutoProbe,$(notdir nf_tee $(IPT_U32-m)))
591 $(call AddDepends/ipt)
594 define KernelPackage/ipt-u32/description
595 Kernel modules for U32
598 $(eval $(call KernelPackage,ipt-u32))
600 define KernelPackage/ipt-checksum
601 TITLE:=CHECKSUM support
603 CONFIG_NETFILTER_XT_TARGET_CHECKSUM
605 $(LINUX_DIR)/net/netfilter/xt_CHECKSUM.ko \
606 $(foreach mod,$(IPT_CHECKSUM-m),$(LINUX_DIR)/net/$(mod).ko)
607 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_CHECKSUM-m)))
608 $(call AddDepends/ipt)
611 define KernelPackage/ipt-checksum/description
612 Kernel modules for CHECKSUM fillin target
615 $(eval $(call KernelPackage,ipt-checksum))
618 define KernelPackage/ipt-iprange
619 TITLE:=Module for matching ip ranges
620 KCONFIG:=$(KCONFIG_IPT_IPRANGE)
621 FILES:=$(foreach mod,$(IPT_IPRANGE-m),$(LINUX_DIR)/net/$(mod).ko)
622 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_IPRANGE-m)))
623 $(call AddDepends/ipt)
626 define KernelPackage/ipt-iprange/description
627 Netfilter (IPv4) module for matching ip ranges
632 $(eval $(call KernelPackage,ipt-iprange))
634 define KernelPackage/ipt-cluster
635 TITLE:=Module for matching cluster
636 KCONFIG:=$(KCONFIG_IPT_CLUSTER)
637 FILES:=$(foreach mod,$(IPT_CLUSTER-m),$(LINUX_DIR)/net/$(mod).ko)
638 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_CLUSTER-m)))
639 $(call AddDepends/ipt)
642 define KernelPackage/ipt-cluster/description
643 Netfilter (IPv4/IPv6) module for matching cluster
644 This option allows you to build work-load-sharing clusters of
645 network servers/stateful firewalls without having a dedicated
646 load-balancing router/server/switch. Basically, this match returns
647 true when the packet must be handled by this cluster node. Thus,
648 all nodes see all packets and this match decides which node handles
649 what packets. The work-load sharing algorithm is based on source
652 This module is usable for ipv4 and ipv6.
654 To use it also enable iptables-mod-cluster
656 see `iptables -m cluster --help` for more information.
659 $(eval $(call KernelPackage,ipt-cluster))
661 define KernelPackage/ipt-clusterip
662 TITLE:=Module for CLUSTERIP
663 KCONFIG:=$(KCONFIG_IPT_CLUSTERIP)
664 FILES:=$(foreach mod,$(IPT_CLUSTERIP-m),$(LINUX_DIR)/net/$(mod).ko)
665 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_CLUSTERIP-m)))
666 $(call AddDepends/ipt,+kmod-nf-conntrack)
669 define KernelPackage/ipt-clusterip/description
670 Netfilter (IPv4-only) module for CLUSTERIP
671 The CLUSTERIP target allows you to build load-balancing clusters of
672 network servers without having a dedicated load-balancing
673 router/server/switch.
675 To use it also enable iptables-mod-clusterip
677 see `iptables -j CLUSTERIP --help` for more information.
680 $(eval $(call KernelPackage,ipt-clusterip))
683 define KernelPackage/ipt-extra
685 KCONFIG:=$(KCONFIG_IPT_EXTRA)
686 FILES:=$(foreach mod,$(IPT_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
687 AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_EXTRA-m)))
688 $(call AddDepends/ipt,+kmod-br-netfilter)
691 define KernelPackage/ipt-extra/description
692 Other Netfilter (IPv4) kernel modules
696 - physdev (if bridge support was enabled in kernel)
701 $(eval $(call KernelPackage,ipt-extra))
704 define KernelPackage/ip6tables
707 DEPENDS:=+kmod-nf-reject6 +kmod-nf-ipt6 +kmod-ipt-core
708 KCONFIG:=$(KCONFIG_IPT_IPV6)
709 FILES:=$(foreach mod,$(IPT_IPV6-m),$(LINUX_DIR)/net/$(mod).ko)
710 AUTOLOAD:=$(call AutoLoad,42,$(notdir $(IPT_IPV6-m)))
713 define KernelPackage/ip6tables/description
714 Netfilter IPv6 firewalling support
717 $(eval $(call KernelPackage,ip6tables))
719 define KernelPackage/ip6tables-extra
721 TITLE:=Extra IPv6 modules
722 DEPENDS:=+kmod-ip6tables
723 KCONFIG:=$(KCONFIG_IPT_IPV6_EXTRA)
724 FILES:=$(foreach mod,$(IPT_IPV6_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
725 AUTOLOAD:=$(call AutoLoad,43,$(notdir $(IPT_IPV6_EXTRA-m)))
728 define KernelPackage/ip6tables-extra/description
729 Netfilter IPv6 extra header matching modules
732 $(eval $(call KernelPackage,ip6tables-extra))
734 ARP_MODULES = arp_tables arpt_mangle arptable_filter
735 define KernelPackage/arptables
737 TITLE:=ARP firewalling modules
738 DEPENDS:=+kmod-ipt-core
739 FILES:=$(LINUX_DIR)/net/ipv4/netfilter/arp*.ko
740 KCONFIG:=CONFIG_IP_NF_ARPTABLES \
741 CONFIG_IP_NF_ARPFILTER \
742 CONFIG_IP_NF_ARP_MANGLE
743 AUTOLOAD:=$(call AutoProbe,$(ARP_MODULES))
746 define KernelPackage/arptables/description
747 Kernel modules for ARP firewalling
750 $(eval $(call KernelPackage,arptables))
753 define KernelPackage/br-netfilter
755 TITLE:=Bridge netfilter support modules
757 DEPENDS:=+kmod-ipt-core
758 FILES:=$(LINUX_DIR)/net/bridge/br_netfilter.ko
759 KCONFIG:=CONFIG_BRIDGE_NETFILTER
760 AUTOLOAD:=$(call AutoProbe,br_netfilter)
763 $(eval $(call KernelPackage,br-netfilter))
766 define KernelPackage/ebtables
768 TITLE:=Bridge firewalling modules
769 DEPENDS:=+kmod-ipt-core +kmod-br-netfilter
770 FILES:=$(foreach mod,$(EBTABLES-m),$(LINUX_DIR)/net/$(mod).ko)
771 KCONFIG:=$(KCONFIG_EBTABLES)
772 AUTOLOAD:=$(call AutoProbe,$(notdir $(EBTABLES-m)))
775 define KernelPackage/ebtables/description
776 ebtables is a general, extensible frame/packet identification
777 framework. It provides you to do Ethernet
778 filtering/NAT/brouting on the Ethernet bridge.
781 $(eval $(call KernelPackage,ebtables))
784 define AddDepends/ebtables
786 DEPENDS+=kmod-ebtables $(1)
790 define KernelPackage/ebtables-ipv4
791 TITLE:=ebtables: IPv4 support
792 FILES:=$(foreach mod,$(EBTABLES_IP4-m),$(LINUX_DIR)/net/$(mod).ko)
793 KCONFIG:=$(KCONFIG_EBTABLES_IP4)
794 AUTOLOAD:=$(call AutoProbe,$(notdir $(EBTABLES_IP4-m)))
795 $(call AddDepends/ebtables)
798 define KernelPackage/ebtables-ipv4/description
799 This option adds the IPv4 support to ebtables, which allows basic
800 IPv4 header field filtering, ARP filtering as well as SNAT, DNAT targets.
803 $(eval $(call KernelPackage,ebtables-ipv4))
806 define KernelPackage/ebtables-ipv6
807 TITLE:=ebtables: IPv6 support
808 FILES:=$(foreach mod,$(EBTABLES_IP6-m),$(LINUX_DIR)/net/$(mod).ko)
809 KCONFIG:=$(KCONFIG_EBTABLES_IP6)
810 AUTOLOAD:=$(call AutoProbe,$(notdir $(EBTABLES_IP6-m)))
811 $(call AddDepends/ebtables)
814 define KernelPackage/ebtables-ipv6/description
815 This option adds the IPv6 support to ebtables, which allows basic
816 IPv6 header field filtering and target support.
819 $(eval $(call KernelPackage,ebtables-ipv6))
822 define KernelPackage/ebtables-watchers
823 TITLE:=ebtables: watchers support
824 FILES:=$(foreach mod,$(EBTABLES_WATCHERS-m),$(LINUX_DIR)/net/$(mod).ko)
825 KCONFIG:=$(KCONFIG_EBTABLES_WATCHERS)
826 AUTOLOAD:=$(call AutoProbe,$(notdir $(EBTABLES_WATCHERS-m)))
827 $(call AddDepends/ebtables)
830 define KernelPackage/ebtables-watchers/description
831 This option adds the log watchers, that you can use in any rule
832 in any ebtables table.
835 $(eval $(call KernelPackage,ebtables-watchers))
838 define KernelPackage/nfnetlink
840 TITLE:=Netlink-based userspace interface
841 FILES:=$(foreach mod,$(NFNETLINK-m),$(LINUX_DIR)/net/$(mod).ko)
842 KCONFIG:=$(KCONFIG_NFNETLINK)
843 AUTOLOAD:=$(call AutoProbe,$(notdir $(NFNETLINK-m)))
846 define KernelPackage/nfnetlink/description
847 Kernel modules support for a netlink-based userspace interface
850 $(eval $(call KernelPackage,nfnetlink))
853 define AddDepends/nfnetlink
855 DEPENDS+=+kmod-nfnetlink $(1)
859 define KernelPackage/nfnetlink-log
860 TITLE:=Netfilter LOG over NFNETLINK interface
861 FILES:=$(foreach mod,$(NFNETLINK_LOG-m),$(LINUX_DIR)/net/$(mod).ko)
862 KCONFIG:=$(KCONFIG_NFNETLINK_LOG)
863 AUTOLOAD:=$(call AutoProbe,$(notdir $(NFNETLINK_LOG-m)))
864 $(call AddDepends/nfnetlink)
867 define KernelPackage/nfnetlink-log/description
868 Kernel modules support for logging packets via NFNETLINK
873 $(eval $(call KernelPackage,nfnetlink-log))
876 define KernelPackage/nfnetlink-queue
877 TITLE:=Netfilter QUEUE over NFNETLINK interface
878 FILES:=$(foreach mod,$(NFNETLINK_QUEUE-m),$(LINUX_DIR)/net/$(mod).ko)
879 KCONFIG:=$(KCONFIG_NFNETLINK_QUEUE)
880 AUTOLOAD:=$(call AutoProbe,$(notdir $(NFNETLINK_QUEUE-m)))
881 $(call AddDepends/nfnetlink)
884 define KernelPackage/nfnetlink-queue/description
885 Kernel modules support for queueing packets via NFNETLINK
890 $(eval $(call KernelPackage,nfnetlink-queue))
893 define KernelPackage/nf-conntrack-netlink
894 TITLE:=Connection tracking netlink interface
895 FILES:=$(LINUX_DIR)/net/netfilter/nf_conntrack_netlink.ko
896 KCONFIG:=CONFIG_NF_CT_NETLINK CONFIG_NF_CONNTRACK_EVENTS=y
897 AUTOLOAD:=$(call AutoProbe,nf_conntrack_netlink)
898 $(call AddDepends/nfnetlink,+kmod-ipt-conntrack)
901 define KernelPackage/nf-conntrack-netlink/description
902 Kernel modules support for a netlink-based connection tracking
906 $(eval $(call KernelPackage,nf-conntrack-netlink))
908 define KernelPackage/ipt-hashlimit
910 TITLE:=Netfilter hashlimit match
911 DEPENDS:=+kmod-ipt-core
912 KCONFIG:=$(KCONFIG_IPT_HASHLIMIT)
913 FILES:=$(LINUX_DIR)/net/netfilter/xt_hashlimit.ko
914 AUTOLOAD:=$(call AutoProbe,xt_hashlimit)
915 $(call KernelPackage/ipt)
918 define KernelPackage/ipt-hashlimit/description
919 Kernel modules support for the hashlimit bucket match module
922 $(eval $(call KernelPackage,ipt-hashlimit))
924 define KernelPackage/ipt-rpfilter
926 TITLE:=Netfilter rpfilter match
927 DEPENDS:=+kmod-ipt-core
928 KCONFIG:=$(KCONFIG_IPT_RPFILTER)
930 $(LINUX_DIR)/net/ipv4/netfilter/ipt_rpfilter.ko \
931 $(LINUX_DIR)/net/ipv6/netfilter/ip6t_rpfilter.ko)
932 AUTOLOAD:=$(call AutoProbe,ipt_rpfilter ip6t_rpfilter)
933 $(call KernelPackage/ipt)
936 define KernelPackage/ipt-rpfilter/description
937 Kernel modules support for the Netfilter rpfilter match
940 $(eval $(call KernelPackage,ipt-rpfilter))
943 define KernelPackage/nft-core
945 TITLE:=Netfilter nf_tables support
946 DEPENDS:=+kmod-nfnetlink +kmod-nf-reject +kmod-nf-reject6 +kmod-nf-conntrack6
947 FILES:=$(foreach mod,$(NFT_CORE-m),$(LINUX_DIR)/net/$(mod).ko)
948 AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_CORE-m)))
950 CONFIG_NFT_COMPAT=n \
955 define KernelPackage/nft-core/description
956 Kernel module support for nftables
959 $(eval $(call KernelPackage,nft-core))
962 define KernelPackage/nft-arp
964 TITLE:=Netfilter nf_tables ARP table support
965 DEPENDS:=+kmod-nft-core
966 FILES:=$(foreach mod,$(NFT_ARP-m),$(LINUX_DIR)/net/$(mod).ko)
967 AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_ARP-m)))
968 KCONFIG:=$(KCONFIG_NFT_ARP)
971 $(eval $(call KernelPackage,nft-arp))
974 define KernelPackage/nft-bridge
976 TITLE:=Netfilter nf_tables bridge table support
977 DEPENDS:=+kmod-nft-core
978 FILES:=$(foreach mod,$(NFT_BRIDGE-m),$(LINUX_DIR)/net/$(mod).ko)
979 AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_BRIDGE-m)))
981 CONFIG_NF_LOG_BRIDGE=n \
982 $(KCONFIG_NFT_BRIDGE)
985 $(eval $(call KernelPackage,nft-bridge))
988 define KernelPackage/nft-nat
990 TITLE:=Netfilter nf_tables NAT support
991 DEPENDS:=+kmod-nft-core +kmod-nf-nat
992 FILES:=$(foreach mod,$(NFT_NAT-m),$(LINUX_DIR)/net/$(mod).ko)
993 AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_NAT-m)))
994 KCONFIG:=$(KCONFIG_NFT_NAT)
997 $(eval $(call KernelPackage,nft-nat))
1000 define KernelPackage/nft-offload
1002 TITLE:=Netfilter nf_tables routing/NAT offload support
1003 DEPENDS:=+kmod-nf-flow +kmod-nft-nat
1005 CONFIG_NF_FLOW_TABLE_INET \
1006 CONFIG_NF_FLOW_TABLE_IPV4 \
1007 CONFIG_NF_FLOW_TABLE_IPV6 \
1008 CONFIG_NFT_FLOW_OFFLOAD
1010 $(LINUX_DIR)/net/netfilter/nf_flow_table_inet.ko \
1011 $(LINUX_DIR)/net/ipv4/netfilter/nf_flow_table_ipv4.ko \
1012 $(LINUX_DIR)/net/ipv6/netfilter/nf_flow_table_ipv6.ko \
1013 $(LINUX_DIR)/net/netfilter/nft_flow_offload.ko
1014 AUTOLOAD:=$(call AutoProbe,nf_flow_table_inet nf_flow_table_ipv4 nf_flow_table_ipv6 nft_flow_offload)
1017 $(eval $(call KernelPackage,nft-offload))
1020 define KernelPackage/nft-nat6
1022 TITLE:=Netfilter nf_tables IPv6-NAT support
1023 DEPENDS:=+kmod-nft-nat +kmod-nf-nat6
1024 FILES:=$(foreach mod,$(NFT_NAT6-m),$(LINUX_DIR)/net/$(mod).ko)
1025 AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_NAT6-m)))
1026 KCONFIG:=$(KCONFIG_NFT_NAT6)
1029 $(eval $(call KernelPackage,nft-nat6))