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
128 $(eval
$(call KernelPackage
,ipt-ipopt
))
131 define KernelPackage
/ipt-ipsec
132 TITLE
:=Modules for matching IPSec packets
133 KCONFIG
:=$(KCONFIG_IPT_IPSEC
)
134 FILES
:=$(foreach mod
,$(IPT_IPSEC-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
135 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_IPSEC-m
)))
136 $(call AddDepends
/ipt
)
139 define KernelPackage
/ipt-ipsec
/description
140 Netfilter
(IPv4
) modules for matching IPSec packets
147 $(eval
$(call KernelPackage
,ipt-ipsec
))
150 define KernelPackage
/ipt-nat
151 TITLE
:=Basic NAT targets
152 KCONFIG
:=$(KCONFIG_IPT_NAT
)
153 FILES
:=$(foreach mod
,$(IPT_NAT-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
154 AUTOLOAD
:=$(call AutoLoad
,42,$(notdir $(IPT_NAT-m
)))
155 $(call AddDepends
/ipt
,+kmod-ipt-conntrack
)
158 define KernelPackage
/ipt-nat
/description
159 Netfilter
(IPv4
) kernel modules for basic NAT targets
164 $(eval
$(call KernelPackage
,ipt-nat
))
167 define KernelPackage
/ipt-nat-extra
168 TITLE
:=Extra NAT targets
169 KCONFIG
:=$(KCONFIG_IPT_NAT_EXTRA
)
170 FILES
:=$(foreach mod
,$(IPT_NAT_EXTRA-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
171 AUTOLOAD
:=$(call AutoLoad
,43,$(notdir $(IPT_NAT_EXTRA-m
)))
172 $(call AddDepends
/ipt
,+kmod-ipt-nat
)
175 define KernelPackage
/ipt-nat-extra
/description
176 Netfilter
(IPv4
) kernel modules for extra NAT targets
182 $(eval
$(call KernelPackage
,ipt-nat-extra
))
185 define KernelPackage
/ipt-nathelper
186 TITLE
:=Basic Conntrack and NAT helpers
187 KCONFIG
:=$(KCONFIG_IPT_NATHELPER
)
188 FILES
:=$(foreach mod
,$(IPT_NATHELPER-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
189 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_NATHELPER-m
)))
190 $(call AddDepends
/ipt
,+kmod-ipt-nat
)
193 define KernelPackage
/ipt-nathelper
/description
194 Default Netfilter
(IPv4
) Conntrack and NAT helpers
201 $(eval
$(call KernelPackage
,ipt-nathelper
))
204 define KernelPackage
/ipt-nathelper-extra
205 TITLE
:=Extra Conntrack and NAT helpers
206 KCONFIG
:=$(KCONFIG_IPT_NATHELPER_EXTRA
)
207 FILES
:=$(foreach mod
,$(IPT_NATHELPER_EXTRA-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
208 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_NATHELPER_EXTRA-m
)))
209 $(call AddDepends
/ipt
,+kmod-ipt-nat
+kmod-lib-textsearch
)
212 define KernelPackage
/ipt-nathelper-extra
/description
213 Extra Netfilter
(IPv4
) Conntrack and NAT helpers
224 $(eval
$(call KernelPackage
,ipt-nathelper-extra
))
227 define KernelPackage
/ipt-queue
228 TITLE
:=Module for user-space packet queueing
229 KCONFIG
:=$(KCONFIG_IPT_QUEUE
)
230 FILES
:=$(foreach mod
,$(IPT_QUEUE-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
231 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_QUEUE-m
)))
232 $(call AddDepends
/ipt
)
235 define KernelPackage
/ipt-queue
/description
236 Netfilter
(IPv4
) module for user-space packet queueing
241 $(eval
$(call KernelPackage
,ipt-queue
))
244 define KernelPackage
/ipt-ulog
245 TITLE
:=Module for user-space packet logging
246 KCONFIG
:=$(KCONFIG_IPT_ULOG
)
247 FILES
:=$(foreach mod
,$(IPT_ULOG-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
248 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_ULOG-m
)))
249 $(call AddDepends
/ipt
)
252 define KernelPackage
/ipt-ulog
/description
253 Netfilter
(IPv4
) module for user-space packet logging
258 $(eval
$(call KernelPackage
,ipt-ulog
))
261 define KernelPackage
/ipt-debug
262 TITLE
:=Module for debugging
/development
263 KCONFIG
:=$(KCONFIG_IPT_DEBUG
)
265 FILES
:=$(foreach mod
,$(IPT_DEBUG-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
266 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_DEBUG-m
)))
267 $(call AddDepends
/ipt
)
270 define KernelPackage
/ipt-debug
/description
271 Netfilter modules for debugging
/development of the firewall
276 $(eval
$(call KernelPackage
,ipt-debug
))
279 define KernelPackage
/ipt-led
280 TITLE
:=Module to trigger a LED with a Netfilter rule
281 KCONFIG
:=$(KCONFIG_IPT_LED
)
282 FILES
:=$(foreach mod
,$(IPT_LED-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
283 AUTOLOAD
:=$(call AutoLoad
,61,$(notdir $(IPT_LED-m
)))
284 $(call AddDepends
/ipt
)
287 define KernelPackage
/ipt-led
/description
288 Netfilter target to trigger a LED when a network packet is matched.
291 $(eval
$(call KernelPackage
,ipt-led
))
293 define KernelPackage
/ipt-tproxy
294 TITLE
:=Transparent proxying support
295 DEPENDS
+=+IPV6
:kmod-ipv6
297 CONFIG_NETFILTER_TPROXY \
298 CONFIG_NETFILTER_XT_MATCH_SOCKET \
299 CONFIG_NETFILTER_XT_TARGET_TPROXY
301 $(LINUX_DIR
)/net
/netfilter
/nf_tproxy_core.ko \
302 $(foreach mod
,$(IPT_TPROXY-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
303 AUTOLOAD
:=$(call AutoLoad
,50,$(notdir nf_tproxy_core
$(IPT_TPROXY-m
)))
304 $(call AddDepends
/ipt
)
307 define KernelPackage
/ipt-tproxy
/description
308 Kernel modules for Transparent Proxying
311 $(eval
$(call KernelPackage
,ipt-tproxy
))
313 define KernelPackage
/ipt-tee
316 CONFIG_NETFILTER_XT_TARGET_TEE
318 $(LINUX_DIR
)/net
/netfilter
/xt_TEE.ko \
319 $(foreach mod
,$(IPT_TEE-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
320 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir nf_tee
$(IPT_TEE-m
)))
321 $(call AddDepends
/ipt
)
324 define KernelPackage
/ipt-tee
/description
325 Kernel modules for TEE
328 $(eval
$(call KernelPackage
,ipt-tee
))
331 define KernelPackage
/ipt-u32
334 CONFIG_NETFILTER_XT_MATCH_U32
336 $(LINUX_DIR
)/net
/netfilter
/xt_u32.ko \
337 $(foreach mod
,$(IPT_U32-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
338 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir nf_tee
$(IPT_U32-m
)))
339 $(call AddDepends
/ipt
)
342 define KernelPackage
/ipt-u32
/description
343 Kernel modules for U32
346 $(eval
$(call KernelPackage
,ipt-u32
))
349 define KernelPackage
/ipt-iprange
350 TITLE
:=Module for matching ip ranges
351 KCONFIG
:=$(KCONFIG_IPT_IPRANGE
)
352 FILES
:=$(foreach mod
,$(IPT_IPRANGE-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
353 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_IPRANGE-m
)))
354 $(call AddDepends
/ipt
)
357 define KernelPackage
/ipt-iprange
/description
358 Netfilter
(IPv4
) module for matching ip ranges
363 $(eval
$(call KernelPackage
,ipt-iprange
))
366 define KernelPackage
/ipt-extra
368 KCONFIG
:=$(KCONFIG_IPT_EXTRA
)
369 FILES
:=$(foreach mod
,$(IPT_EXTRA-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
370 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_EXTRA-m
)))
371 $(call AddDepends
/ipt
)
374 define KernelPackage
/ipt-extra
/description
375 Other Netfilter
(IPv4
) kernel modules
378 - physdev
(if bridge support was enabled in kernel
)
383 $(eval
$(call KernelPackage
,ipt-extra
))
386 define KernelPackage
/ip6tables
390 KCONFIG
:=$(KCONFIG_IPT_IPV6
)
391 FILES
:=$(foreach mod
,$(IPT_IPV6-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
392 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(IPT_IPV6-m
)))
395 define KernelPackage
/ip6tables
/description
396 Netfilter IPv6 firewalling support
399 $(eval
$(call KernelPackage
,ip6tables
))
402 define KernelPackage
/arptables
404 TITLE
:=ARP firewalling modules
405 FILES
:=$(LINUX_DIR
)/net
/ipv4
/netfilter
/arp
*.ko
406 KCONFIG
:=CONFIG_IP_NF_ARPTABLES \
407 CONFIG_IP_NF_ARPFILTER \
408 CONFIG_IP_NF_ARP_MANGLE
409 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(patsubst %.ko
,%,$(wildcard $(LINUX_DIR
)/net
/ipv4
/netfilter
/arp
*.ko
))))
412 define KernelPackage
/arptables
/description
413 Kernel modules for ARP firewalling
416 $(eval
$(call KernelPackage
,arptables
))
419 define KernelPackage
/ebtables
421 TITLE
:=Bridge firewalling modules
422 FILES
:=$(foreach mod
,$(EBTABLES-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
423 KCONFIG
:=CONFIG_BRIDGE_NETFILTER
=y \
425 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(EBTABLES-m
)))
428 define KernelPackage
/ebtables
/description
429 ebtables is a general
, extensible frame
/packet identification
430 framework. It provides you to do Ethernet
431 filtering
/NAT
/brouting on the Ethernet bridge.
434 $(eval
$(call KernelPackage
,ebtables
))
437 define AddDepends
/ebtables
439 DEPENDS
+=kmod-ebtables
$(1)
443 define KernelPackage
/ebtables-ipv4
444 TITLE
:=ebtables
: IPv4 support
445 FILES
:=$(foreach mod
,$(EBTABLES_IP4-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
446 KCONFIG
:=$(KCONFIG_EBTABLES_IP4
)
447 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(EBTABLES_IP4-m
)))
448 $(call AddDepends
/ebtables
)
451 define KernelPackage
/ebtables-ipv4
/description
452 This option adds the IPv4 support to ebtables
, which allows basic
453 IPv4 header field filtering
, ARP filtering
as well
as SNAT
, DNAT targets.
456 $(eval
$(call KernelPackage
,ebtables-ipv4
))
459 define KernelPackage
/ebtables-ipv6
460 TITLE
:=ebtables
: IPv6 support
461 FILES
:=$(foreach mod
,$(EBTABLES_IP6-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
462 KCONFIG
:=$(KCONFIG_EBTABLES_IP6
)
463 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(EBTABLES_IP6-m
)))
464 $(call AddDepends
/ebtables
)
467 define KernelPackage
/ebtables-ipv6
/description
468 This option adds the IPv6 support to ebtables
, which allows basic
469 IPv6 header field filtering and target support.
472 $(eval
$(call KernelPackage
,ebtables-ipv6
))
475 define KernelPackage
/ebtables-watchers
476 TITLE
:=ebtables
: watchers support
477 FILES
:=$(foreach mod
,$(EBTABLES_WATCHERS-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
478 KCONFIG
:=$(KCONFIG_EBTABLES_WATCHERS
)
479 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(EBTABLES_WATCHERS-m
)))
480 $(call AddDepends
/ebtables
)
483 define KernelPackage
/ebtables-watchers
/description
484 This option adds the log watchers
, that you can use in any rule
485 in any ebtables table.
488 $(eval
$(call KernelPackage
,ebtables-watchers
))
491 define KernelPackage
/nfnetlink
493 TITLE
:=Netlink-based userspace interface
494 DEPENDS
:=+kmod-ipt-core
495 FILES
:=$(LINUX_DIR
)/net
/netfilter
/nfnetlink.ko
496 KCONFIG
:=CONFIG_NETFILTER_NETLINK
497 AUTOLOAD
:=$(call AutoLoad
,48,nfnetlink
)
500 define KernelPackage
/nfnetlink
/description
501 Kernel modules support for a netlink-based userspace interface
504 $(eval
$(call KernelPackage
,nfnetlink
))
507 define AddDepends
/nfnetlink
509 DEPENDS
+=+kmod-nfnetlink
$(1)
513 define KernelPackage
/nfnetlink-log
514 TITLE
:=Netfilter LOG over NFNETLINK interface
515 FILES
:=$(LINUX_DIR
)/net
/netfilter
/nfnetlink_log.ko
516 KCONFIG
:=CONFIG_NETFILTER_NETLINK_LOG
517 AUTOLOAD
:=$(call AutoLoad
,48,nfnetlink_log
)
518 $(call AddDepends
/nfnetlink
)
521 define KernelPackage
/nfnetlink-log
/description
522 Kernel modules support for logging packets via NFNETLINK
525 $(eval
$(call KernelPackage
,nfnetlink-log
))
528 define KernelPackage
/nfnetlink-queue
529 TITLE
:=Netfilter QUEUE over NFNETLINK interface
530 FILES
:=$(LINUX_DIR
)/net
/netfilter
/nfnetlink_queue.ko
531 KCONFIG
:=CONFIG_NETFILTER_NETLINK_QUEUE
532 AUTOLOAD
:=$(call AutoLoad
,48,nfnetlink_queue
)
533 $(call AddDepends
/nfnetlink
)
536 define KernelPackage
/nfnetlink-queue
/description
537 Kernel modules support for queueing packets via NFNETLINK
540 $(eval
$(call KernelPackage
,nfnetlink-queue
))
543 define KernelPackage
/nf-conntrack-netlink
544 TITLE
:=Connection tracking netlink interface
545 FILES
:=$(LINUX_DIR
)/net
/netfilter
/nf_conntrack_netlink.ko
546 KCONFIG
:=CONFIG_NF_CT_NETLINK
547 AUTOLOAD
:=$(call AutoLoad
,49,nf_conntrack_netlink
)
548 $(call AddDepends
/nfnetlink
,+kmod-ipt-conntrack
)
551 define KernelPackage
/nf-conntrack-netlink
/description
552 Kernel modules support for a netlink-based connection tracking
556 $(eval
$(call KernelPackage
,nf-conntrack-netlink
))
558 define KernelPackage
/ipt-hashlimit
560 TITLE
:=Netfilter hashlimit match
561 KCONFIG
:=$(KCONFIG_IPT_HASHLIMIT
)
562 FILES
:=$(LINUX_DIR
)/net
/netfilter
/xt_hashlimit.ko
563 AUTOLOAD
:=$(call AutoLoad
,50,xt_hashlimit
)
564 $(call KernelPackage
/ipt
)
567 define KernelPackage
/ipt-hashlimit
/description
568 Kernel modules support for the hashlimit bucket match module
571 $(eval
$(call KernelPackage
,ipt-hashlimit
))