3 # Copyright (C) 2006-2008 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
16 KCONFIG
:=$(KCONFIG_IPT_CORE
)
17 FILES
:=$(foreach mod
,$(IPT_CORE-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
18 AUTOLOAD
:=$(call AutoLoad
,40,$(notdir $(IPT_CORE-m
)))
21 define KernelPackage
/ipt-core
/description
22 Netfilter core kernel modules
32 $(eval
$(call KernelPackage
,ipt-core
))
35 define KernelPackage
/ipt
/Depends
37 DEPENDS
:= kmod-ipt-core
$(1)
41 define KernelPackage
/ipt-conntrack
42 $(call KernelPackage
/ipt
/Depends
,)
43 TITLE
:=Basic connection tracking modules
44 KCONFIG
:=$(KCONFIG_IPT_CONNTRACK
)
45 FILES
:=$(foreach mod
,$(IPT_CONNTRACK-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
46 AUTOLOAD
:=$(call AutoLoad
,41,$(notdir $(IPT_CONNTRACK-m
)))
49 define KernelPackage
/ipt-conntrack
/description
50 Netfilter
(IPv4
) kernel modules for connection tracking
55 $(eval
$(call KernelPackage
,ipt-conntrack
))
58 define KernelPackage
/ipt-conntrack-extra
59 $(call KernelPackage
/ipt
/Depends
,+kmod-ipt-conntrack
)
60 TITLE
:=Extra connection tracking modules
61 KCONFIG
:=$(KCONFIG_IPT_CONNTRACK_EXTRA
)
62 FILES
:=$(foreach mod
,$(IPT_CONNTRACK_EXTRA-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
63 AUTOLOAD
:=$(call AutoLoad
,42,$(notdir $(IPT_CONNTRACK_EXTRA-m
)))
66 define KernelPackage
/ipt-conntrack-extra
/description
67 Netfilter
(IPv4
) extra kernel modules for connection tracking
77 $(eval
$(call KernelPackage
,ipt-conntrack-extra
))
80 define KernelPackage
/ipt-filter
81 $(call KernelPackage
/ipt
/Depends
,+LINUX_2_6
:kmod-textsearch
)
82 TITLE
:=Modules for packet content inspection
83 KCONFIG
:=$(KCONFIG_IPT_FILTER
)
84 FILES
:=$(foreach mod
,$(IPT_FILTER-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
85 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_FILTER-m
)))
88 define KernelPackage
/ipt-filter
/description
89 Netfilter
(IPv4
) kernel modules for packet content inspection
95 $(eval
$(call KernelPackage
,ipt-filter
))
98 define KernelPackage
/ipt-ipopt
99 $(call KernelPackage
/ipt
/Depends
,)
100 TITLE
:=Modules for matching
/changing IP packet options
101 KCONFIG
:=$(KCONFIG_IPT_IPOPT
)
102 FILES
:=$(foreach mod
,$(IPT_IPOPT-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
103 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_IPOPT-m
)))
106 define KernelPackage
/ipt-ipopt
/description
107 Netfilter
(IPv4
) modules for matching
/changing IP packet options
119 $(eval
$(call KernelPackage
,ipt-ipopt
))
122 define KernelPackage
/ipt-ipsec
123 $(call KernelPackage
/ipt
/Depends
,)
124 TITLE
:=Modules for matching IPSec packets
125 KCONFIG
:=$(KCONFIG_IPT_IPSEC
)
126 FILES
:=$(foreach mod
,$(IPT_IPSEC-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
127 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_IPSEC-m
)))
130 define KernelPackage
/ipt-ipsec
/description
131 Netfilter
(IPv4
) modules for matching IPSec packets
137 $(eval
$(call KernelPackage
,ipt-ipsec
))
140 define KernelPackage
/ipt-nat
141 $(call KernelPackage
/ipt
/Depends
,+kmod-ipt-conntrack
)
142 TITLE
:=Basic NAT targets
143 KCONFIG
:=$(KCONFIG_IPT_NAT
)
144 FILES
:=$(foreach mod
,$(IPT_NAT-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
145 AUTOLOAD
:=$(call AutoLoad
,42,$(notdir $(IPT_NAT-m
)))
148 define KernelPackage
/ipt-nat
/description
149 Netfilter
(IPv4
) kernel modules for basic NAT targets
154 $(eval
$(call KernelPackage
,ipt-nat
))
157 define KernelPackage
/ipt-nat-extra
158 $(call KernelPackage
/ipt
/Depends
,+kmod-ipt-nat
)
159 TITLE
:=Extra NAT targets
160 KCONFIG
:=$(KCONFIG_IPT_NAT_EXTRA
)
161 FILES
:=$(foreach mod
,$(IPT_NAT_EXTRA-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
162 AUTOLOAD
:=$(call AutoLoad
,43,$(notdir $(IPT_NAT_EXTRA-m
)))
165 define KernelPackage
/ipt-nat-extra
/description
166 Netfilter
(IPv4
) kernel modules for extra NAT targets
173 $(eval
$(call KernelPackage
,ipt-nat-extra
))
176 define KernelPackage
/ipt-nathelper
177 $(call KernelPackage
/ipt
/Depends
,+kmod-ipt-nat
)
178 TITLE
:=Basic Conntrack and NAT helpers
179 KCONFIG
:=$(KCONFIG_IPT_NATHELPER
)
180 FILES
:=$(foreach mod
,$(IPT_NATHELPER-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
181 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_NATHELPER-m
)))
184 define KernelPackage
/ipt-nathelper
/description
185 Default Netfilter
(IPv4
) Conntrack and NAT helpers
195 $(eval
$(call KernelPackage
,ipt-nathelper
))
198 define KernelPackage
/ipt-nathelper-extra
199 $(call KernelPackage
/ipt
/Depends
,+kmod-ipt-nat
+LINUX_2_6
:kmod-textsearch
)
200 TITLE
:=Extra Conntrack and NAT helpers
201 KCONFIG
:=$(KCONFIG_IPT_NATHELPER_EXTRA
)
202 FILES
:=$(foreach mod
,$(IPT_NATHELPER_EXTRA-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
203 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_NATHELPER_EXTRA-m
)))
206 define KernelPackage
/ipt-nathelper-extra
/description
207 Extra Netfilter
(IPv4
) Conntrack and NAT helpers
209 - ip_conntrack_amanda
210 - ip_conntrack_proto_gre
219 $(eval
$(call KernelPackage
,ipt-nathelper-extra
))
222 define KernelPackage
/ipt-imq
223 $(call KernelPackage
/ipt
/Depends
,)
224 TITLE
:=Intermediate Queueing support
227 CONFIG_IMQ_BEHAVIOR_BA
=y \
228 CONFIG_IMQ_NUM_DEVS
=2 \
229 CONFIG_NETFILTER_XT_TARGET_IMQ
231 $(LINUX_DIR
)/drivers
/net
/imq.
$(LINUX_KMOD_SUFFIX
) \
232 $(foreach mod
,$(IPT_IMQ-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
233 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir \
239 define KernelPackage
/ipt-imq
/description
240 Kernel support for Intermediate Queueing devices
243 $(eval
$(call KernelPackage
,ipt-imq
))
246 define KernelPackage
/ipt-queue
247 $(call KernelPackage
/ipt
/Depends
,)
248 TITLE
:=Module for user-space packet queueing
249 KCONFIG
:=$(KCONFIG_IPT_QUEUE
)
250 FILES
:=$(foreach mod
,$(IPT_QUEUE-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
251 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_QUEUE-m
)))
254 define KernelPackage
/ipt-queue
/description
255 Netfilter
(IPv4
) module for user-space packet queueing
260 $(eval
$(call KernelPackage
,ipt-queue
))
263 define KernelPackage
/ipt-ulog
264 $(call KernelPackage
/ipt
/Depends
,)
265 TITLE
:=Module for user-space packet logging
266 KCONFIG
:=$(KCONFIG_IPT_ULOG
)
267 FILES
:=$(foreach mod
,$(IPT_ULOG-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
268 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_ULOG-m
)))
271 define KernelPackage
/ipt-ulog
/description
272 Netfilter
(IPv4
) module for user-space packet logging
277 $(eval
$(call KernelPackage
,ipt-ulog
))
280 define KernelPackage
/ipt-iprange
281 $(call KernelPackage
/ipt
/Depends
,)
282 TITLE
:=Module for matching ip ranges
283 KCONFIG
:=$(KCONFIG_IPT_IPRANGE
)
284 FILES
:=$(foreach mod
,$(IPT_IPRANGE-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
285 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_IPRANGE-m
)))
288 define KernelPackage
/ipt-iprange
/description
289 Netfilter
(IPv4
) module for matching ip ranges
294 $(eval
$(call KernelPackage
,ipt-iprange
))
297 define KernelPackage
/ipt-extra
298 $(call KernelPackage
/ipt
/Depends
,)
300 KCONFIG
:=$(KCONFIG_IPT_EXTRA
)
301 FILES
:=$(foreach mod
,$(IPT_EXTRA-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
302 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_EXTRA-m
)))
305 define KernelPackage
/ipt-extra
/description
306 Other Netfilter
(IPv4
) kernel modules
316 $(eval
$(call KernelPackage
,ipt-extra
))
319 define KernelPackage
/ip6tables
323 KCONFIG
:=$(KCONFIG_IPT_IPV6
)
324 FILES
:=$(foreach mod
,$(IPT_IPV6-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
325 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(IPT_IPV6-m
)))
328 define KernelPackage
/ip6tables
/description
329 Netfilter IPv6 firewalling support
332 $(eval
$(call KernelPackage
,ip6tables
))
335 define KernelPackage
/arptables
337 TITLE
:=ARP firewalling modules
338 FILES
:=$(LINUX_DIR
)/net
/ipv4
/netfilter
/arp
*.
$(LINUX_KMOD_SUFFIX
)
339 KCONFIG
:=CONFIG_IP_NF_ARPTABLES \
340 CONFIG_IP_NF_ARPFILTER \
341 CONFIG_IP_NF_ARP_MANGLE
342 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(patsubst %.
$(LINUX_KMOD_SUFFIX
),%,$(wildcard $(LINUX_DIR
)/net
/ipv4
/netfilter
/arp
*.
$(LINUX_KMOD_SUFFIX
)))))
345 define KernelPackage
/arptables
/description
346 Kernel modules for ARP firewalling
349 $(eval
$(call KernelPackage
,arptables
))
352 define KernelPackage
/ebtables
354 TITLE
:=Bridge firewalling modules
356 FILES
:=$(foreach mod
,$(EBTABLES-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
357 KCONFIG
:=CONFIG_BRIDGE_NETFILTER
=y \
359 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(EBTABLES-m
)))
362 define KernelPackage
/ebtables
/description
363 ebtables is a general
, extensible frame
/packet identification
364 framework. It provides you to do Ethernet
365 filtering
/NAT
/brouting on the Ethernet bridge.
368 $(eval
$(call KernelPackage
,ebtables
))
371 define KernelPackage
/ebtables
/Depends
373 DEPENDS
:=kmod-ebtables
$(1)
377 define KernelPackage
/ebtables-ipv4
378 $(call KernelPackage
/ebtables
/Depends
,)
379 TITLE
:=ebtables
: IPv4 support
380 FILES
:=$(foreach mod
,$(EBTABLES_IP4-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
381 KCONFIG
:=$(KCONFIG_EBTABLES_IP4
)
382 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(EBTABLES_IP4-m
)))
385 define KernelPackage
/ebtables-ipv4
/description
386 This option adds the IPv4 support to ebtables
, which allows basic
387 IPv4 header field filtering
, ARP filtering
as well
as SNAT
, DNAT targets.
390 $(eval
$(call KernelPackage
,ebtables-ipv4
))
393 define KernelPackage
/ebtables-ipv6
394 $(call KernelPackage
/ebtables
/Depends
,)
395 TITLE
:=ebtables
: IPv6 support
396 FILES
:=$(foreach mod
,$(EBTABLES_IP6-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
397 KCONFIG
:=$(KCONFIG_EBTABLES_IP6
)
398 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(EBTABLES_IP6-m
)))
401 define KernelPackage
/ebtables-ipv6
/description
402 This option adds the IPv6 support to ebtables
, which allows basic
403 IPv6 header field filtering and target support.
406 $(eval
$(call KernelPackage
,ebtables-ipv6
))
409 define KernelPackage
/ebtables-watchers
410 $(call KernelPackage
/ebtables
/Depends
,)
411 TITLE
:=ebtables
: watchers support
412 FILES
:=$(foreach mod
,$(EBTABLES_WATCHERS-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
413 KCONFIG
:=$(KCONFIG_EBTABLES_WATCHERS
)
414 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(EBTABLES_WATCHERS-m
)))
417 define KernelPackage
/ebtables-watchers
/description
418 This option adds the log watchers
, that you can use in any rule
419 in any ebtables table.
422 $(eval
$(call KernelPackage
,ebtables-watchers
))
425 define KernelPackage
/nfnetlink
427 TITLE
:=Netlink-based userspace interface
428 DEPENDS
:=@LINUX_2_6
+kmod-ipt-core
429 FILES
:=$(LINUX_DIR
)/net
/netfilter
/nfnetlink.
$(LINUX_KMOD_SUFFIX
)
430 KCONFIG
:=CONFIG_NETFILTER_NETLINK
431 AUTOLOAD
:=$(call AutoLoad
,48,nfnetlink
)
434 define KernelPackage
/nfnetlink
/description
435 Kernel modules support for a netlink-based userspace interface
438 $(eval
$(call KernelPackage
,nfnetlink
))
441 define KernelPackage
/nfnetlink
/Depends
443 DEPENDS
:=@LINUX_2_6
+kmod-nfnetlink
$(1)
447 define KernelPackage
/nfnetlink-log
448 $(call KernelPackage
/nfnetlink
/Depends
,)
449 TITLE
:=Netfilter LOG over NFNETLINK interface
450 FILES
:=$(LINUX_DIR
)/net
/netfilter
/nfnetlink_log.
$(LINUX_KMOD_SUFFIX
)
451 KCONFIG
:=CONFIG_NETFILTER_NETLINK_LOG
452 AUTOLOAD
:=$(call AutoLoad
,48,nfnetlink_log
)
455 define KernelPackage
/nfnetlink-log
/description
456 Kernel modules support for logging packets via NFNETLINK
459 $(eval
$(call KernelPackage
,nfnetlink-log
))
462 define KernelPackage
/nfnetlink-queue
463 $(call KernelPackage
/nfnetlink
/Depends
,)
464 TITLE
:=Netfilter QUEUE over NFNETLINK interface
465 FILES
:=$(LINUX_DIR
)/net
/netfilter
/nfnetlink_queue.
$(LINUX_KMOD_SUFFIX
)
466 KCONFIG
:=CONFIG_NETFILTER_NETLINK_QUEUE
467 AUTOLOAD
:=$(call AutoLoad
,48,nfnetlink_queue
)
470 define KernelPackage
/nfnetlink-queue
/description
471 Kernel modules support for queueing packets via NFNETLINK
474 $(eval
$(call KernelPackage
,nfnetlink-queue
))
477 define KernelPackage
/nf-conntrack-netlink
478 $(call KernelPackage
/nfnetlink
/Depends
,+kmod-ipt-conntrack
)
479 TITLE
:=Connection tracking netlink interface
480 FILES
:=$(LINUX_DIR
)/net
/netfilter
/nf_conntrack_netlink.
$(LINUX_KMOD_SUFFIX
)
481 KCONFIG
:=CONFIG_NF_CT_NETLINK
482 AUTOLOAD
:=$(call AutoLoad
,49,nf_conntrack_netlink
)
485 define KernelPackage
/nf-conntrack-netlink
/description
486 Kernel modules support for a netlink-based connection tracking
490 $(eval
$(call KernelPackage
,nf-conntrack-netlink
))