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
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
33 $(eval
$(call KernelPackage
,ipt-core
))
38 DEPENDS
+= kmod-ipt-core
$(1)
42 define KernelPackage
/ipt-conntrack
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
)))
47 $(call AddDepends
/ipt
)
50 define KernelPackage
/ipt-conntrack
/description
51 Netfilter
(IPv4
) kernel modules for connection tracking
60 $(eval
$(call KernelPackage
,ipt-conntrack
))
63 define KernelPackage
/ipt-conntrack-extra
64 TITLE
:=Extra connection tracking modules
65 KCONFIG
:=$(KCONFIG_IPT_CONNTRACK_EXTRA
)
66 FILES
:=$(foreach mod
,$(IPT_CONNTRACK_EXTRA-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
67 AUTOLOAD
:=$(call AutoLoad
,42,$(notdir $(IPT_CONNTRACK_EXTRA-m
)))
68 $(call AddDepends
/ipt
,+kmod-ipt-conntrack
)
71 define KernelPackage
/ipt-conntrack-extra
/description
72 Netfilter
(IPv4
) extra kernel modules for connection tracking
81 $(eval
$(call KernelPackage
,ipt-conntrack-extra
))
84 define KernelPackage
/ipt-filter
85 TITLE
:=Modules for packet content inspection
86 KCONFIG
:=$(KCONFIG_IPT_FILTER
)
87 FILES
:=$(foreach mod
,$(IPT_FILTER-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
88 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_FILTER-m
)))
89 $(call AddDepends
/ipt
,+LINUX_2_6
:kmod-textsearch
)
92 define KernelPackage
/ipt-filter
/description
93 Netfilter
(IPv4
) kernel modules for packet content inspection
99 $(eval
$(call KernelPackage
,ipt-filter
))
102 define KernelPackage
/ipt-ipopt
103 TITLE
:=Modules for matching
/changing IP packet options
104 KCONFIG
:=$(KCONFIG_IPT_IPOPT
)
105 FILES
:=$(foreach mod
,$(IPT_IPOPT-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
106 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_IPOPT-m
)))
107 $(call AddDepends
/ipt
)
110 define KernelPackage
/ipt-ipopt
/description
111 Netfilter
(IPv4
) modules for matching
/changing IP packet options
116 - hl
/HL
(2.6.30 and later
)
122 - tos
/TOS
(prior to
2.6.25)
123 - ttl
/TTL
(prior to
2.6.30)
127 $(eval
$(call KernelPackage
,ipt-ipopt
))
130 define KernelPackage
/ipt-ipsec
131 TITLE
:=Modules for matching IPSec packets
132 KCONFIG
:=$(KCONFIG_IPT_IPSEC
)
133 FILES
:=$(foreach mod
,$(IPT_IPSEC-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
134 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_IPSEC-m
)))
135 $(call AddDepends
/ipt
)
138 define KernelPackage
/ipt-ipsec
/description
139 Netfilter
(IPv4
) modules for matching IPSec packets
146 $(eval
$(call KernelPackage
,ipt-ipsec
))
149 define KernelPackage
/ipt-nat
150 TITLE
:=Basic NAT targets
151 KCONFIG
:=$(KCONFIG_IPT_NAT
)
152 FILES
:=$(foreach mod
,$(IPT_NAT-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
153 AUTOLOAD
:=$(call AutoLoad
,42,$(notdir $(IPT_NAT-m
)))
154 $(call AddDepends
/ipt
,+kmod-ipt-conntrack
)
157 define KernelPackage
/ipt-nat
/description
158 Netfilter
(IPv4
) kernel modules for basic NAT targets
163 $(eval
$(call KernelPackage
,ipt-nat
))
166 define KernelPackage
/ipt-nat-extra
167 TITLE
:=Extra NAT targets
168 KCONFIG
:=$(KCONFIG_IPT_NAT_EXTRA
)
169 FILES
:=$(foreach mod
,$(IPT_NAT_EXTRA-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
170 AUTOLOAD
:=$(call AutoLoad
,43,$(notdir $(IPT_NAT_EXTRA-m
)))
171 $(call AddDepends
/ipt
,+kmod-ipt-nat
)
174 define KernelPackage
/ipt-nat-extra
/description
175 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
).
$(LINUX_KMOD_SUFFIX
))
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
).
$(LINUX_KMOD_SUFFIX
))
208 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_NATHELPER_EXTRA-m
)))
209 $(call AddDepends
/ipt
,+kmod-ipt-nat
+LINUX_2_6
:kmod-textsearch
)
212 define KernelPackage
/ipt-nathelper-extra
/description
213 Extra Netfilter
(IPv4
) Conntrack and NAT helpers
225 $(eval
$(call KernelPackage
,ipt-nathelper-extra
))
228 define KernelPackage
/ipt-imq
229 TITLE
:=Intermediate Queueing support
232 CONFIG_IMQ_BEHAVIOR_BA
=y \
233 CONFIG_IMQ_NUM_DEVS
=2 \
234 CONFIG_NETFILTER_XT_TARGET_IMQ
236 $(LINUX_DIR
)/drivers
/net
/imq.
$(LINUX_KMOD_SUFFIX
) \
237 $(foreach mod
,$(IPT_IMQ-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
238 AUTOLOAD
:=$(call AutoLoad
,46,$(notdir \
242 $(call AddDepends
/ipt
)
245 define KernelPackage
/ipt-imq
/description
246 Kernel support for Intermediate Queueing devices
249 $(eval
$(call KernelPackage
,ipt-imq
))
252 define KernelPackage
/ipt-queue
253 TITLE
:=Module for user-space packet queueing
254 KCONFIG
:=$(KCONFIG_IPT_QUEUE
)
255 FILES
:=$(foreach mod
,$(IPT_QUEUE-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
256 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_QUEUE-m
)))
257 $(call AddDepends
/ipt
)
260 define KernelPackage
/ipt-queue
/description
261 Netfilter
(IPv4
) module for user-space packet queueing
266 $(eval
$(call KernelPackage
,ipt-queue
))
269 define KernelPackage
/ipt-ulog
270 TITLE
:=Module for user-space packet logging
271 KCONFIG
:=$(KCONFIG_IPT_ULOG
)
272 FILES
:=$(foreach mod
,$(IPT_ULOG-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
273 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_ULOG-m
)))
274 $(call AddDepends
/ipt
)
277 define KernelPackage
/ipt-ulog
/description
278 Netfilter
(IPv4
) module for user-space packet logging
283 $(eval
$(call KernelPackage
,ipt-ulog
))
286 define KernelPackage
/ipt-tproxy
287 TITLE
:=Transparent proxying support
290 CONFIG_NETFILTER_TPROXY \
291 CONFIG_NETFILTER_XT_MATCH_SOCKET \
292 CONFIG_NETFILTER_XT_TARGET_TPROXY
294 $(LINUX_DIR
)/net
/netfilter
/nf_tproxy_core.
$(LINUX_KMOD_SUFFIX
) \
295 $(foreach mod
,$(IPT_TPROXY-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
296 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir nf_tproxy_core
$(IPT_TPROXY-m
)))
297 $(call AddDepends
/ipt
)
300 define KernelPackage
/ipt-tproxy
/description
301 Kernel modules for Transparent Proxying
304 $(eval
$(call KernelPackage
,ipt-tproxy
))
307 define KernelPackage
/ipt-iprange
308 TITLE
:=Module for matching ip ranges
309 KCONFIG
:=$(KCONFIG_IPT_IPRANGE
)
310 FILES
:=$(foreach mod
,$(IPT_IPRANGE-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
311 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_IPRANGE-m
)))
312 $(call AddDepends
/ipt
)
315 define KernelPackage
/ipt-iprange
/description
316 Netfilter
(IPv4
) module for matching ip ranges
321 $(eval
$(call KernelPackage
,ipt-iprange
))
324 define KernelPackage
/ipt-extra
326 KCONFIG
:=$(KCONFIG_IPT_EXTRA
)
327 FILES
:=$(foreach mod
,$(IPT_EXTRA-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
328 AUTOLOAD
:=$(call AutoLoad
,45,$(notdir $(IPT_EXTRA-m
)))
329 $(call AddDepends
/ipt
)
332 define KernelPackage
/ipt-extra
/description
333 Other Netfilter
(IPv4
) kernel modules
335 - condition
(2.4 only
)
337 - physdev
(if bridge support was enabled in kernel
)
342 $(eval
$(call KernelPackage
,ipt-extra
))
345 define KernelPackage
/ip6tables
349 KCONFIG
:=$(KCONFIG_IPT_IPV6
)
350 FILES
:=$(foreach mod
,$(IPT_IPV6-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
351 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(IPT_IPV6-m
)))
354 define KernelPackage
/ip6tables
/description
355 Netfilter IPv6 firewalling support
358 $(eval
$(call KernelPackage
,ip6tables
))
361 define KernelPackage
/arptables
363 TITLE
:=ARP firewalling modules
364 FILES
:=$(LINUX_DIR
)/net
/ipv4
/netfilter
/arp
*.
$(LINUX_KMOD_SUFFIX
)
365 KCONFIG
:=CONFIG_IP_NF_ARPTABLES \
366 CONFIG_IP_NF_ARPFILTER \
367 CONFIG_IP_NF_ARP_MANGLE
368 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(patsubst %.
$(LINUX_KMOD_SUFFIX
),%,$(wildcard $(LINUX_DIR
)/net
/ipv4
/netfilter
/arp
*.
$(LINUX_KMOD_SUFFIX
)))))
371 define KernelPackage
/arptables
/description
372 Kernel modules for ARP firewalling
375 $(eval
$(call KernelPackage
,arptables
))
378 define KernelPackage
/ebtables
380 TITLE
:=Bridge firewalling modules
382 FILES
:=$(foreach mod
,$(EBTABLES-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
383 KCONFIG
:=CONFIG_BRIDGE_NETFILTER
=y \
385 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(EBTABLES-m
)))
388 define KernelPackage
/ebtables
/description
389 ebtables is a general
, extensible frame
/packet identification
390 framework. It provides you to do Ethernet
391 filtering
/NAT
/brouting on the Ethernet bridge.
394 $(eval
$(call KernelPackage
,ebtables
))
397 define AddDepends
/ebtables
399 DEPENDS
+=kmod-ebtables
$(1)
403 define KernelPackage
/ebtables-ipv4
404 TITLE
:=ebtables
: IPv4 support
405 FILES
:=$(foreach mod
,$(EBTABLES_IP4-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
406 KCONFIG
:=$(KCONFIG_EBTABLES_IP4
)
407 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(EBTABLES_IP4-m
)))
408 $(call AddDepends
/ebtables
)
411 define KernelPackage
/ebtables-ipv4
/description
412 This option adds the IPv4 support to ebtables
, which allows basic
413 IPv4 header field filtering
, ARP filtering
as well
as SNAT
, DNAT targets.
416 $(eval
$(call KernelPackage
,ebtables-ipv4
))
419 define KernelPackage
/ebtables-ipv6
420 TITLE
:=ebtables
: IPv6 support
421 FILES
:=$(foreach mod
,$(EBTABLES_IP6-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
422 KCONFIG
:=$(KCONFIG_EBTABLES_IP6
)
423 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(EBTABLES_IP6-m
)))
424 $(call AddDepends
/ebtables
)
427 define KernelPackage
/ebtables-ipv6
/description
428 This option adds the IPv6 support to ebtables
, which allows basic
429 IPv6 header field filtering and target support.
432 $(eval
$(call KernelPackage
,ebtables-ipv6
))
435 define KernelPackage
/ebtables-watchers
436 TITLE
:=ebtables
: watchers support
437 FILES
:=$(foreach mod
,$(EBTABLES_WATCHERS-m
),$(LINUX_DIR
)/net
/$(mod
).
$(LINUX_KMOD_SUFFIX
))
438 KCONFIG
:=$(KCONFIG_EBTABLES_WATCHERS
)
439 AUTOLOAD
:=$(call AutoLoad
,49,$(notdir $(EBTABLES_WATCHERS-m
)))
440 $(call AddDepends
/ebtables
)
443 define KernelPackage
/ebtables-watchers
/description
444 This option adds the log watchers
, that you can use in any rule
445 in any ebtables table.
448 $(eval
$(call KernelPackage
,ebtables-watchers
))
451 define KernelPackage
/nfnetlink
453 TITLE
:=Netlink-based userspace interface
454 DEPENDS
:=@LINUX_2_6
+kmod-ipt-core
455 FILES
:=$(LINUX_DIR
)/net
/netfilter
/nfnetlink.
$(LINUX_KMOD_SUFFIX
)
456 KCONFIG
:=CONFIG_NETFILTER_NETLINK
457 AUTOLOAD
:=$(call AutoLoad
,48,nfnetlink
)
460 define KernelPackage
/nfnetlink
/description
461 Kernel modules support for a netlink-based userspace interface
464 $(eval
$(call KernelPackage
,nfnetlink
))
467 define AddDepends
/nfnetlink
469 DEPENDS
+=@LINUX_2_6
+kmod-nfnetlink
$(1)
473 define KernelPackage
/nfnetlink-log
474 TITLE
:=Netfilter LOG over NFNETLINK interface
475 FILES
:=$(LINUX_DIR
)/net
/netfilter
/nfnetlink_log.
$(LINUX_KMOD_SUFFIX
)
476 KCONFIG
:=CONFIG_NETFILTER_NETLINK_LOG
477 AUTOLOAD
:=$(call AutoLoad
,48,nfnetlink_log
)
478 $(call AddDepends
/nfnetlink
)
481 define KernelPackage
/nfnetlink-log
/description
482 Kernel modules support for logging packets via NFNETLINK
485 $(eval
$(call KernelPackage
,nfnetlink-log
))
488 define KernelPackage
/nfnetlink-queue
489 TITLE
:=Netfilter QUEUE over NFNETLINK interface
490 FILES
:=$(LINUX_DIR
)/net
/netfilter
/nfnetlink_queue.
$(LINUX_KMOD_SUFFIX
)
491 KCONFIG
:=CONFIG_NETFILTER_NETLINK_QUEUE
492 AUTOLOAD
:=$(call AutoLoad
,48,nfnetlink_queue
)
493 $(call AddDepends
/nfnetlink
)
496 define KernelPackage
/nfnetlink-queue
/description
497 Kernel modules support for queueing packets via NFNETLINK
500 $(eval
$(call KernelPackage
,nfnetlink-queue
))
503 define KernelPackage
/nf-conntrack-netlink
504 TITLE
:=Connection tracking netlink interface
505 FILES
:=$(LINUX_DIR
)/net
/netfilter
/nf_conntrack_netlink.
$(LINUX_KMOD_SUFFIX
)
506 KCONFIG
:=CONFIG_NF_CT_NETLINK
507 AUTOLOAD
:=$(call AutoLoad
,49,nf_conntrack_netlink
)
508 $(call AddDepends
/nfnetlink
,+kmod-ipt-conntrack
)
511 define KernelPackage
/nf-conntrack-netlink
/description
512 Kernel modules support for a netlink-based connection tracking
516 $(eval
$(call KernelPackage
,nf-conntrack-netlink
))