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
13 define KernelPackage
/ipt-core
18 CONFIG_NETFILTER_ADVANCED
=y \
20 FILES
:=$(foreach mod
,$(IPT_CORE-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
21 AUTOLOAD
:=$(call AutoLoad
,40,$(notdir $(IPT_CORE-m
)))
24 define KernelPackage
/ipt-core
/description
25 Netfilter core kernel modules
36 $(eval
$(call KernelPackage
,ipt-core
))
41 DEPENDS
+= kmod-ipt-core
$(1)
45 define KernelPackage
/ipt-conntrack
46 TITLE
:=Basic connection tracking modules
47 KCONFIG
:=$(KCONFIG_IPT_CONNTRACK
)
48 FILES
:=$(foreach mod
,$(IPT_CONNTRACK-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
49 AUTOLOAD
:=$(call AutoLoad
,41,$(notdir $(IPT_CONNTRACK-m
)))
50 $(call AddDepends
/ipt
)
53 define KernelPackage
/ipt-conntrack
/description
54 Netfilter
(IPv4
) kernel modules for connection tracking
63 $(eval
$(call KernelPackage
,ipt-conntrack
))
66 define KernelPackage
/ipt-conntrack-extra
67 TITLE
:=Extra connection tracking modules
68 KCONFIG
:=$(KCONFIG_IPT_CONNTRACK_EXTRA
)
69 FILES
:=$(foreach mod
,$(IPT_CONNTRACK_EXTRA-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
70 AUTOLOAD
:=$(call AutoLoad
,42,$(notdir $(IPT_CONNTRACK_EXTRA-m
)))
71 $(call AddDepends
/ipt
,+kmod-ipt-conntrack
)
74 define KernelPackage
/ipt-conntrack-extra
/description
75 Netfilter
(IPv4
) extra kernel modules for connection tracking
84 $(eval
$(call KernelPackage
,ipt-conntrack-extra
))
87 define KernelPackage
/ipt-filter
88 TITLE
:=Modules for packet content inspection
89 KCONFIG
:=$(KCONFIG_IPT_FILTER
)
90 FILES
:=$(foreach mod
,$(IPT_FILTER-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
91 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_FILTER-m
)))
92 $(call AddDepends
/ipt
,+kmod-lib-textsearch
)
95 define KernelPackage
/ipt-filter
/description
96 Netfilter
(IPv4
) kernel modules for packet content inspection
102 $(eval
$(call KernelPackage
,ipt-filter
))
105 define KernelPackage
/ipt-ipopt
106 TITLE
:=Modules for matching
/changing IP packet options
107 KCONFIG
:=$(KCONFIG_IPT_IPOPT
)
108 FILES
:=$(foreach mod
,$(IPT_IPOPT-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
109 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_IPOPT-m
)))
110 $(call AddDepends
/ipt
)
113 define KernelPackage
/ipt-ipopt
/description
114 Netfilter
(IPv4
) modules for matching
/changing IP packet options
129 $(eval
$(call KernelPackage
,ipt-ipopt
))
132 define KernelPackage
/ipt-ipsec
133 TITLE
:=Modules for matching IPSec packets
134 KCONFIG
:=$(KCONFIG_IPT_IPSEC
)
135 FILES
:=$(foreach mod
,$(IPT_IPSEC-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
136 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_IPSEC-m
)))
137 $(call AddDepends
/ipt
)
140 define KernelPackage
/ipt-ipsec
/description
141 Netfilter
(IPv4
) modules for matching IPSec packets
148 $(eval
$(call KernelPackage
,ipt-ipsec
))
151 define KernelPackage
/ipt-nat
152 TITLE
:=Basic NAT targets
153 KCONFIG
:=$(KCONFIG_IPT_NAT
)
154 FILES
:=$(foreach mod
,$(IPT_NAT-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
155 AUTOLOAD
:=$(call AutoLoad
,42,$(notdir $(IPT_NAT-m
)))
156 $(call AddDepends
/ipt
,+kmod-ipt-conntrack
)
159 define KernelPackage
/ipt-nat
/description
160 Netfilter
(IPv4
) kernel modules for basic NAT targets
165 $(eval
$(call KernelPackage
,ipt-nat
))
168 define KernelPackage
/ipt-nat-extra
169 TITLE
:=Extra NAT targets
170 KCONFIG
:=$(KCONFIG_IPT_NAT_EXTRA
)
171 FILES
:=$(foreach mod
,$(IPT_NAT_EXTRA-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
172 AUTOLOAD
:=$(call AutoLoad
,43,$(notdir $(IPT_NAT_EXTRA-m
)))
173 $(call AddDepends
/ipt
,+kmod-ipt-nat
)
176 define KernelPackage
/ipt-nat-extra
/description
177 Netfilter
(IPv4
) kernel modules for extra NAT targets
183 $(eval
$(call KernelPackage
,ipt-nat-extra
))
186 define KernelPackage
/ipt-nathelper
187 TITLE
:=Basic Conntrack and NAT helpers
188 KCONFIG
:=$(KCONFIG_IPT_NATHELPER
)
189 FILES
:=$(foreach mod
,$(IPT_NATHELPER-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
190 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_NATHELPER-m
)))
191 $(call AddDepends
/ipt
,+kmod-ipt-nat
)
194 define KernelPackage
/ipt-nathelper
/description
195 Default Netfilter
(IPv4
) Conntrack and NAT helpers
202 $(eval
$(call KernelPackage
,ipt-nathelper
))
205 define KernelPackage
/ipt-nathelper-extra
206 TITLE
:=Extra Conntrack and NAT helpers
207 KCONFIG
:=$(KCONFIG_IPT_NATHELPER_EXTRA
)
208 FILES
:=$(foreach mod
,$(IPT_NATHELPER_EXTRA-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
209 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_NATHELPER_EXTRA-m
)))
210 $(call AddDepends
/ipt
,+kmod-ipt-nat
+kmod-lib-textsearch
)
213 define KernelPackage
/ipt-nathelper-extra
/description
214 Extra Netfilter
(IPv4
) Conntrack and NAT helpers
226 $(eval
$(call KernelPackage
,ipt-nathelper-extra
))
229 define KernelPackage
/ipt-queue
230 TITLE
:=Module for user-space packet queueing
231 KCONFIG
:=$(KCONFIG_IPT_QUEUE
)
233 FILES
:=$(foreach mod
,$(IPT_QUEUE-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
234 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_QUEUE-m
)))
235 $(call AddDepends
/ipt
)
238 define KernelPackage
/ipt-queue
/description
239 Netfilter
(IPv4
) module for user-space packet queueing
244 $(eval
$(call KernelPackage
,ipt-queue
))
247 define KernelPackage
/ipt-ulog
248 TITLE
:=Module for user-space packet logging
249 KCONFIG
:=$(KCONFIG_IPT_ULOG
)
250 FILES
:=$(foreach mod
,$(IPT_ULOG-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
251 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_ULOG-m
)))
252 $(call AddDepends
/ipt
)
255 define KernelPackage
/ipt-ulog
/description
256 Netfilter
(IPv4
) module for user-space packet logging
261 $(eval
$(call KernelPackage
,ipt-ulog
))
264 define KernelPackage
/ipt-debug
265 TITLE
:=Module for debugging
/development
266 KCONFIG
:=$(KCONFIG_IPT_DEBUG
)
268 FILES
:=$(foreach mod
,$(IPT_DEBUG-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
269 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_DEBUG-m
)))
270 $(call AddDepends
/ipt
)
273 define KernelPackage
/ipt-debug
/description
274 Netfilter modules for debugging
/development of the firewall
279 $(eval
$(call KernelPackage
,ipt-debug
))
282 define KernelPackage
/ipt-led
283 TITLE
:=Module to trigger a LED with a Netfilter rule
284 KCONFIG
:=$(KCONFIG_IPT_LED
)
285 FILES
:=$(foreach mod
,$(IPT_LED-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
286 AUTOLOAD
:=$(call AutoLoad
,61,$(notdir $(IPT_LED-m
)))
287 $(call AddDepends
/ipt
)
290 define KernelPackage
/ipt-led
/description
291 Netfilter target to trigger a LED when a network packet is matched.
294 $(eval
$(call KernelPackage
,ipt-led
))
296 define KernelPackage
/ipt-tproxy
297 TITLE
:=Transparent proxying support
298 DEPENDS
+=+IPV6
:kmod-ipv6
300 CONFIG_NETFILTER_TPROXY \
301 CONFIG_NETFILTER_XT_MATCH_SOCKET \
302 CONFIG_NETFILTER_XT_TARGET_TPROXY
304 $(LINUX_DIR
)/net
/netfilter
/nf_tproxy_core.ko \
305 $(foreach mod
,$(IPT_TPROXY-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
306 AUTOLOAD
:=$(call AutoLoad
,50,$(notdir nf_tproxy_core
$(IPT_TPROXY-m
)))
307 $(call AddDepends
/ipt
)
310 define KernelPackage
/ipt-tproxy
/description
311 Kernel modules for Transparent Proxying
314 $(eval
$(call KernelPackage
,ipt-tproxy
))
316 define KernelPackage
/ipt-tee
319 CONFIG_NETFILTER_XT_TARGET_TEE
321 $(LINUX_DIR
)/net
/netfilter
/xt_TEE.ko \
322 $(foreach mod
,$(IPT_TEE-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
323 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir nf_tee
$(IPT_TEE-m
)))
324 $(call AddDepends
/ipt
)
327 define KernelPackage
/ipt-tee
/description
328 Kernel modules for TEE
331 $(eval
$(call KernelPackage
,ipt-tee
))
334 define KernelPackage
/ipt-u32
337 CONFIG_NETFILTER_XT_MATCH_U32
339 $(LINUX_DIR
)/net
/netfilter
/xt_u32.ko \
340 $(foreach mod
,$(IPT_U32-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
341 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir nf_tee
$(IPT_U32-m
)))
342 $(call AddDepends
/ipt
)
345 define KernelPackage
/ipt-u32
/description
346 Kernel modules for U32
349 $(eval
$(call KernelPackage
,ipt-u32
))
352 define KernelPackage
/ipt-iprange
353 TITLE
:=Module for matching ip ranges
354 KCONFIG
:=$(KCONFIG_IPT_IPRANGE
)
355 FILES
:=$(foreach mod
,$(IPT_IPRANGE-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
356 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_IPRANGE-m
)))
357 $(call AddDepends
/ipt
)
360 define KernelPackage
/ipt-iprange
/description
361 Netfilter
(IPv4
) module for matching ip ranges
366 $(eval
$(call KernelPackage
,ipt-iprange
))
369 define KernelPackage
/ipt-extra
371 KCONFIG
:=$(KCONFIG_IPT_EXTRA
)
372 FILES
:=$(foreach mod
,$(IPT_EXTRA-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
373 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_EXTRA-m
)))
374 $(call AddDepends
/ipt
)
377 define KernelPackage
/ipt-extra
/description
378 Other Netfilter
(IPv4
) kernel modules
382 - physdev
(if bridge support was enabled in kernel
)
387 $(eval
$(call KernelPackage
,ipt-extra
))
390 define KernelPackage
/ip6tables
394 KCONFIG
:=$(KCONFIG_IPT_IPV6
)
395 FILES
:=$(foreach mod
,$(IPT_IPV6-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
396 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(IPT_IPV6-m
)))
399 define KernelPackage
/ip6tables
/description
400 Netfilter IPv6 firewalling support
403 $(eval
$(call KernelPackage
,ip6tables
))
405 ARP_MODULES
= arp_tables arpt_mangle arptable_filter
406 define KernelPackage
/arptables
408 TITLE
:=ARP firewalling modules
409 FILES
:=$(LINUX_DIR
)/net
/ipv4
/netfilter
/arp
*.ko
410 KCONFIG
:=CONFIG_IP_NF_ARPTABLES \
411 CONFIG_IP_NF_ARPFILTER \
412 CONFIG_IP_NF_ARP_MANGLE
413 AUTOLOAD
:=$(call AutoLoad
,49,$(ARP_MODULES
))
416 define KernelPackage
/arptables
/description
417 Kernel modules for ARP firewalling
420 $(eval
$(call KernelPackage
,arptables
))
423 define KernelPackage
/ebtables
425 TITLE
:=Bridge firewalling modules
426 FILES
:=$(foreach mod
,$(EBTABLES-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
427 KCONFIG
:=CONFIG_BRIDGE_NETFILTER
=y \
429 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(EBTABLES-m
)))
432 define KernelPackage
/ebtables
/description
433 ebtables is a general
, extensible frame
/packet identification
434 framework. It provides you to do Ethernet
435 filtering
/NAT
/brouting on the Ethernet bridge.
438 $(eval
$(call KernelPackage
,ebtables
))
441 define AddDepends
/ebtables
443 DEPENDS
+=kmod-ebtables
$(1)
447 define KernelPackage
/ebtables-ipv4
448 TITLE
:=ebtables
: IPv4 support
449 FILES
:=$(foreach mod
,$(EBTABLES_IP4-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
450 KCONFIG
:=$(KCONFIG_EBTABLES_IP4
)
451 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(EBTABLES_IP4-m
)))
452 $(call AddDepends
/ebtables
)
455 define KernelPackage
/ebtables-ipv4
/description
456 This option adds the IPv4 support to ebtables
, which allows basic
457 IPv4 header field filtering
, ARP filtering
as well
as SNAT
, DNAT targets.
460 $(eval
$(call KernelPackage
,ebtables-ipv4
))
463 define KernelPackage
/ebtables-ipv6
464 TITLE
:=ebtables
: IPv6 support
465 FILES
:=$(foreach mod
,$(EBTABLES_IP6-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
466 KCONFIG
:=$(KCONFIG_EBTABLES_IP6
)
467 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(EBTABLES_IP6-m
)))
468 $(call AddDepends
/ebtables
)
471 define KernelPackage
/ebtables-ipv6
/description
472 This option adds the IPv6 support to ebtables
, which allows basic
473 IPv6 header field filtering and target support.
476 $(eval
$(call KernelPackage
,ebtables-ipv6
))
479 define KernelPackage
/ebtables-watchers
480 TITLE
:=ebtables
: watchers support
481 FILES
:=$(foreach mod
,$(EBTABLES_WATCHERS-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
482 KCONFIG
:=$(KCONFIG_EBTABLES_WATCHERS
)
483 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(EBTABLES_WATCHERS-m
)))
484 $(call AddDepends
/ebtables
)
487 define KernelPackage
/ebtables-watchers
/description
488 This option adds the log watchers
, that you can use in any rule
489 in any ebtables table.
492 $(eval
$(call KernelPackage
,ebtables-watchers
))
495 define KernelPackage
/nfnetlink
497 TITLE
:=Netlink-based userspace interface
498 DEPENDS
:=+kmod-ipt-core
499 FILES
:=$(LINUX_DIR
)/net
/netfilter
/nfnetlink.ko
500 KCONFIG
:=CONFIG_NETFILTER_NETLINK
501 AUTOLOAD
:=$(call AutoLoad
,48,nfnetlink
)
504 define KernelPackage
/nfnetlink
/description
505 Kernel modules support for a netlink-based userspace interface
508 $(eval
$(call KernelPackage
,nfnetlink
))
511 define AddDepends
/nfnetlink
513 DEPENDS
+=+kmod-nfnetlink
$(1)
517 define KernelPackage
/nfnetlink-log
518 TITLE
:=Netfilter LOG over NFNETLINK interface
519 FILES
:=$(LINUX_DIR
)/net
/netfilter
/nfnetlink_log.ko
520 KCONFIG
:=CONFIG_NETFILTER_NETLINK_LOG
521 AUTOLOAD
:=$(call AutoLoad
,48,nfnetlink_log
)
522 $(call AddDepends
/nfnetlink
)
525 define KernelPackage
/nfnetlink-log
/description
526 Kernel modules support for logging packets via NFNETLINK
529 $(eval
$(call KernelPackage
,nfnetlink-log
))
532 define KernelPackage
/nfnetlink-queue
533 TITLE
:=Netfilter QUEUE over NFNETLINK interface
534 FILES
:=$(LINUX_DIR
)/net
/netfilter
/nfnetlink_queue.ko
535 KCONFIG
:=CONFIG_NETFILTER_NETLINK_QUEUE
536 AUTOLOAD
:=$(call AutoLoad
,48,nfnetlink_queue
)
537 $(call AddDepends
/nfnetlink
)
540 define KernelPackage
/nfnetlink-queue
/description
541 Kernel modules support for queueing packets via NFNETLINK
544 $(eval
$(call KernelPackage
,nfnetlink-queue
))
547 define KernelPackage
/nf-conntrack-netlink
548 TITLE
:=Connection tracking netlink interface
549 FILES
:=$(LINUX_DIR
)/net
/netfilter
/nf_conntrack_netlink.ko
550 KCONFIG
:=CONFIG_NF_CT_NETLINK
551 AUTOLOAD
:=$(call AutoLoad
,49,nf_conntrack_netlink
)
552 $(call AddDepends
/nfnetlink
,+kmod-ipt-conntrack
)
555 define KernelPackage
/nf-conntrack-netlink
/description
556 Kernel modules support for a netlink-based connection tracking
560 $(eval
$(call KernelPackage
,nf-conntrack-netlink
))
562 define KernelPackage
/ipt-hashlimit
564 TITLE
:=Netfilter hashlimit match
565 KCONFIG
:=$(KCONFIG_IPT_HASHLIMIT
)
566 FILES
:=$(LINUX_DIR
)/net
/netfilter
/xt_hashlimit.ko
567 AUTOLOAD
:=$(call AutoLoad
,50,xt_hashlimit
)
568 $(call KernelPackage
/ipt
)
571 define KernelPackage
/ipt-hashlimit
/description
572 Kernel modules support for the hashlimit bucket match module
575 $(eval
$(call KernelPackage
,ipt-hashlimit
))