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-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
119 - hl
/HL
(2.6.30 and later
)
125 - tos
/TOS
(prior to
2.6.25)
126 - ttl
/TTL
(prior to
2.6.30)
130 $(eval
$(call KernelPackage
,ipt-ipopt
))
133 define KernelPackage
/ipt-ipsec
134 TITLE
:=Modules for matching IPSec packets
135 KCONFIG
:=$(KCONFIG_IPT_IPSEC
)
136 FILES
:=$(foreach mod
,$(IPT_IPSEC-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
137 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_IPSEC-m
)))
138 $(call AddDepends
/ipt
)
141 define KernelPackage
/ipt-ipsec
/description
142 Netfilter
(IPv4
) modules for matching IPSec packets
149 $(eval
$(call KernelPackage
,ipt-ipsec
))
152 define KernelPackage
/ipt-nat
153 TITLE
:=Basic NAT targets
154 KCONFIG
:=$(KCONFIG_IPT_NAT
)
155 FILES
:=$(foreach mod
,$(IPT_NAT-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
156 AUTOLOAD
:=$(call AutoLoad
,42,$(notdir $(IPT_NAT-m
)))
157 $(call AddDepends
/ipt
,+kmod-ipt-conntrack
)
160 define KernelPackage
/ipt-nat
/description
161 Netfilter
(IPv4
) kernel modules for basic NAT targets
166 $(eval
$(call KernelPackage
,ipt-nat
))
169 define KernelPackage
/ipt-nat-extra
170 TITLE
:=Extra NAT targets
171 KCONFIG
:=$(KCONFIG_IPT_NAT_EXTRA
)
172 FILES
:=$(foreach mod
,$(IPT_NAT_EXTRA-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
173 AUTOLOAD
:=$(call AutoLoad
,43,$(notdir $(IPT_NAT_EXTRA-m
)))
174 $(call AddDepends
/ipt
,+kmod-ipt-nat
)
177 define KernelPackage
/ipt-nat-extra
/description
178 Netfilter
(IPv4
) kernel modules for extra NAT targets
185 $(eval
$(call KernelPackage
,ipt-nat-extra
))
188 define KernelPackage
/ipt-nathelper
189 TITLE
:=Basic Conntrack and NAT helpers
190 KCONFIG
:=$(KCONFIG_IPT_NATHELPER
)
191 FILES
:=$(foreach mod
,$(IPT_NATHELPER-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
192 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_NATHELPER-m
)))
193 $(call AddDepends
/ipt
,+kmod-ipt-nat
)
196 define KernelPackage
/ipt-nathelper
/description
197 Default Netfilter
(IPv4
) Conntrack and NAT helpers
204 $(eval
$(call KernelPackage
,ipt-nathelper
))
207 define KernelPackage
/ipt-nathelper-extra
208 TITLE
:=Extra Conntrack and NAT helpers
209 KCONFIG
:=$(KCONFIG_IPT_NATHELPER_EXTRA
)
210 FILES
:=$(foreach mod
,$(IPT_NATHELPER_EXTRA-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
211 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_NATHELPER_EXTRA-m
)))
212 $(call AddDepends
/ipt
,+kmod-ipt-nat
+kmod-textsearch
)
215 define KernelPackage
/ipt-nathelper-extra
/description
216 Extra Netfilter
(IPv4
) Conntrack and NAT helpers
228 $(eval
$(call KernelPackage
,ipt-nathelper-extra
))
231 define KernelPackage
/ipt-queue
232 TITLE
:=Module for user-space packet queueing
233 KCONFIG
:=$(KCONFIG_IPT_QUEUE
)
234 FILES
:=$(foreach mod
,$(IPT_QUEUE-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
235 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_QUEUE-m
)))
236 $(call AddDepends
/ipt
)
239 define KernelPackage
/ipt-queue
/description
240 Netfilter
(IPv4
) module for user-space packet queueing
245 $(eval
$(call KernelPackage
,ipt-queue
))
248 define KernelPackage
/ipt-ulog
249 TITLE
:=Module for user-space packet logging
250 KCONFIG
:=$(KCONFIG_IPT_ULOG
)
251 FILES
:=$(foreach mod
,$(IPT_ULOG-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
252 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_ULOG-m
)))
253 $(call AddDepends
/ipt
)
256 define KernelPackage
/ipt-ulog
/description
257 Netfilter
(IPv4
) module for user-space packet logging
262 $(eval
$(call KernelPackage
,ipt-ulog
))
265 define KernelPackage
/ipt-led
266 TITLE
:=Module to trigger a LED with a Netfilter rule
267 KCONFIG
:=$(KCONFIG_IPT_LED
)
268 FILES
:=$(foreach mod
,$(IPT_LED-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
269 AUTOLOAD
:=$(call AutoLoad
,61,$(notdir $(IPT_LED-m
)))
270 $(call AddDepends
/ipt
)
273 define KernelPackage
/ipt-led
/description
274 Netfilter target to trigger a LED when a network packet is matched.
277 $(eval
$(call KernelPackage
,ipt-led
))
279 define KernelPackage
/ipt-tproxy
280 TITLE
:=Transparent proxying support
282 CONFIG_NETFILTER_TPROXY \
283 CONFIG_NETFILTER_XT_MATCH_SOCKET \
284 CONFIG_NETFILTER_XT_TARGET_TPROXY
286 $(LINUX_DIR
)/net
/netfilter
/nf_tproxy_core.ko \
287 $(foreach mod
,$(IPT_TPROXY-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
288 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir nf_tproxy_core
$(IPT_TPROXY-m
)))
289 $(call AddDepends
/ipt
)
292 define KernelPackage
/ipt-tproxy
/description
293 Kernel modules for Transparent Proxying
296 $(eval
$(call KernelPackage
,ipt-tproxy
))
299 define KernelPackage
/ipt-iprange
300 TITLE
:=Module for matching ip ranges
301 KCONFIG
:=$(KCONFIG_IPT_IPRANGE
)
302 FILES
:=$(foreach mod
,$(IPT_IPRANGE-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
303 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_IPRANGE-m
)))
304 $(call AddDepends
/ipt
)
307 define KernelPackage
/ipt-iprange
/description
308 Netfilter
(IPv4
) module for matching ip ranges
313 $(eval
$(call KernelPackage
,ipt-iprange
))
316 define KernelPackage
/ipt-extra
318 KCONFIG
:=$(KCONFIG_IPT_EXTRA
)
319 FILES
:=$(foreach mod
,$(IPT_EXTRA-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
320 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_EXTRA-m
)))
321 $(call AddDepends
/ipt
)
324 define KernelPackage
/ipt-extra
/description
325 Other Netfilter
(IPv4
) kernel modules
327 - condition
(2.4 only
)
329 - physdev
(if bridge support was enabled in kernel
)
334 $(eval
$(call KernelPackage
,ipt-extra
))
337 define KernelPackage
/ip6tables
341 KCONFIG
:=$(KCONFIG_IPT_IPV6
)
342 FILES
:=$(foreach mod
,$(IPT_IPV6-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
343 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(IPT_IPV6-m
)))
346 define KernelPackage
/ip6tables
/description
347 Netfilter IPv6 firewalling support
350 $(eval
$(call KernelPackage
,ip6tables
))
353 define KernelPackage
/arptables
355 TITLE
:=ARP firewalling modules
356 FILES
:=$(LINUX_DIR
)/net
/ipv4
/netfilter
/arp
*.ko
357 KCONFIG
:=CONFIG_IP_NF_ARPTABLES \
358 CONFIG_IP_NF_ARPFILTER \
359 CONFIG_IP_NF_ARP_MANGLE
360 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(patsubst %.ko
,%,$(wildcard $(LINUX_DIR
)/net
/ipv4
/netfilter
/arp
*.ko
))))
363 define KernelPackage
/arptables
/description
364 Kernel modules for ARP firewalling
367 $(eval
$(call KernelPackage
,arptables
))
370 define KernelPackage
/ebtables
372 TITLE
:=Bridge firewalling modules
373 FILES
:=$(foreach mod
,$(EBTABLES-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
374 KCONFIG
:=CONFIG_BRIDGE_NETFILTER
=y \
376 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(EBTABLES-m
)))
379 define KernelPackage
/ebtables
/description
380 ebtables is a general
, extensible frame
/packet identification
381 framework. It provides you to do Ethernet
382 filtering
/NAT
/brouting on the Ethernet bridge.
385 $(eval
$(call KernelPackage
,ebtables
))
388 define AddDepends
/ebtables
390 DEPENDS
+=kmod-ebtables
$(1)
394 define KernelPackage
/ebtables-ipv4
395 TITLE
:=ebtables
: IPv4 support
396 FILES
:=$(foreach mod
,$(EBTABLES_IP4-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
397 KCONFIG
:=$(KCONFIG_EBTABLES_IP4
)
398 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(EBTABLES_IP4-m
)))
399 $(call AddDepends
/ebtables
)
402 define KernelPackage
/ebtables-ipv4
/description
403 This option adds the IPv4 support to ebtables
, which allows basic
404 IPv4 header field filtering
, ARP filtering
as well
as SNAT
, DNAT targets.
407 $(eval
$(call KernelPackage
,ebtables-ipv4
))
410 define KernelPackage
/ebtables-ipv6
411 TITLE
:=ebtables
: IPv6 support
412 FILES
:=$(foreach mod
,$(EBTABLES_IP6-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
413 KCONFIG
:=$(KCONFIG_EBTABLES_IP6
)
414 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(EBTABLES_IP6-m
)))
415 $(call AddDepends
/ebtables
)
418 define KernelPackage
/ebtables-ipv6
/description
419 This option adds the IPv6 support to ebtables
, which allows basic
420 IPv6 header field filtering and target support.
423 $(eval
$(call KernelPackage
,ebtables-ipv6
))
426 define KernelPackage
/ebtables-watchers
427 TITLE
:=ebtables
: watchers support
428 FILES
:=$(foreach mod
,$(EBTABLES_WATCHERS-m
),$(LINUX_DIR
)/net
/$(mod
).ko
)
429 KCONFIG
:=$(KCONFIG_EBTABLES_WATCHERS
)
430 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(EBTABLES_WATCHERS-m
)))
431 $(call AddDepends
/ebtables
)
434 define KernelPackage
/ebtables-watchers
/description
435 This option adds the log watchers
, that you can use in any rule
436 in any ebtables table.
439 $(eval
$(call KernelPackage
,ebtables-watchers
))
442 define KernelPackage
/nfnetlink
444 TITLE
:=Netlink-based userspace interface
445 DEPENDS
:=+kmod-ipt-core
446 FILES
:=$(LINUX_DIR
)/net
/netfilter
/nfnetlink.ko
447 KCONFIG
:=CONFIG_NETFILTER_NETLINK
448 AUTOLOAD
:=$(call AutoLoad
,48,nfnetlink
)
451 define KernelPackage
/nfnetlink
/description
452 Kernel modules support for a netlink-based userspace interface
455 $(eval
$(call KernelPackage
,nfnetlink
))
458 define AddDepends
/nfnetlink
460 DEPENDS
+=+kmod-nfnetlink
$(1)
464 define KernelPackage
/nfnetlink-log
465 TITLE
:=Netfilter LOG over NFNETLINK interface
466 FILES
:=$(LINUX_DIR
)/net
/netfilter
/nfnetlink_log.ko
467 KCONFIG
:=CONFIG_NETFILTER_NETLINK_LOG
468 AUTOLOAD
:=$(call AutoLoad
,48,nfnetlink_log
)
469 $(call AddDepends
/nfnetlink
)
472 define KernelPackage
/nfnetlink-log
/description
473 Kernel modules support for logging packets via NFNETLINK
476 $(eval
$(call KernelPackage
,nfnetlink-log
))
479 define KernelPackage
/nfnetlink-queue
480 TITLE
:=Netfilter QUEUE over NFNETLINK interface
481 FILES
:=$(LINUX_DIR
)/net
/netfilter
/nfnetlink_queue.ko
482 KCONFIG
:=CONFIG_NETFILTER_NETLINK_QUEUE
483 AUTOLOAD
:=$(call AutoLoad
,48,nfnetlink_queue
)
484 $(call AddDepends
/nfnetlink
)
487 define KernelPackage
/nfnetlink-queue
/description
488 Kernel modules support for queueing packets via NFNETLINK
491 $(eval
$(call KernelPackage
,nfnetlink-queue
))
494 define KernelPackage
/nf-conntrack-netlink
495 TITLE
:=Connection tracking netlink interface
496 FILES
:=$(LINUX_DIR
)/net
/netfilter
/nf_conntrack_netlink.ko
497 KCONFIG
:=CONFIG_NF_CT_NETLINK
498 AUTOLOAD
:=$(call AutoLoad
,49,nf_conntrack_netlink
)
499 $(call AddDepends
/nfnetlink
,+kmod-ipt-conntrack
)
502 define KernelPackage
/nf-conntrack-netlink
/description
503 Kernel modules support for a netlink-based connection tracking
507 $(eval
$(call KernelPackage
,nf-conntrack-netlink
))
509 define KernelPackage
/ipt-hashlimit
511 TITLE
:=Netfilter hashlimit match
512 KCONFIG
:=$(KCONFIG_IPT_HASHLIMIT
)
513 FILES
:=$(LINUX_DIR
)/net
/netfilter
/xt_hashlimit.ko
514 AUTOLOAD
:=$(call AutoLoad
,50,xt_hashlimit
)
515 $(call KernelPackage
/ipt
)
518 define KernelPackage
/ipt-hashlimit
/description
519 Kernel modules support for the hashlimit bucket match module
522 $(eval
$(call KernelPackage
,ipt-hashlimit
))