kernel: remove an old kernel compatibility line from module packaging
[oweals/openwrt.git] / package / kernel / linux / modules / netfilter.mk
1
2 #
3 # Copyright (C) 2006-2010 OpenWrt.org
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8
9 NF_MENU:=Netfilter Extensions
10 NF_KMOD:=1
11 include $(INCLUDE_DIR)/netfilter.mk
12
13
14 define KernelPackage/nf-reject
15   SUBMENU:=$(NF_MENU)
16   TITLE:=Netfilter IPv4 reject support
17   KCONFIG:= \
18         CONFIG_NETFILTER=y \
19         CONFIG_NETFILTER_ADVANCED=y \
20         $(KCONFIG_NF_REJECT)
21   FILES:=$(foreach mod,$(NF_REJECT-m),$(LINUX_DIR)/net/$(mod).ko)
22   AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_REJECT-m)))
23 endef
24
25 $(eval $(call KernelPackage,nf-reject))
26
27
28 define KernelPackage/nf-reject6
29   SUBMENU:=$(NF_MENU)
30   TITLE:=Netfilter IPv6 reject support
31   KCONFIG:= \
32         CONFIG_NETFILTER=y \
33         CONFIG_NETFILTER_ADVANCED=y \
34         $(KCONFIG_NF_REJECT6)
35   DEPENDS:=@IPV6
36   FILES:=$(foreach mod,$(NF_REJECT6-m),$(LINUX_DIR)/net/$(mod).ko)
37   AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_REJECT6-m)))
38 endef
39
40 $(eval $(call KernelPackage,nf-reject6))
41
42
43 define KernelPackage/nf-ipt
44   SUBMENU:=$(NF_MENU)
45   TITLE:=Iptables core
46   KCONFIG:=$(KCONFIG_NF_IPT)
47   FILES:=$(foreach mod,$(NF_IPT-m),$(LINUX_DIR)/net/$(mod).ko)
48   AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_IPT-m)))
49 endef
50
51 $(eval $(call KernelPackage,nf-ipt))
52
53
54 define KernelPackage/nf-ipt6
55   SUBMENU:=$(NF_MENU)
56   TITLE:=Ip6tables core
57   KCONFIG:=$(KCONFIG_NF_IPT6)
58   FILES:=$(foreach mod,$(NF_IPT6-m),$(LINUX_DIR)/net/$(mod).ko)
59   AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_IPT6-m)))
60   DEPENDS:=+kmod-nf-ipt
61 endef
62
63 $(eval $(call KernelPackage,nf-ipt6))
64
65
66
67 define KernelPackage/ipt-core
68   SUBMENU:=$(NF_MENU)
69   TITLE:=Iptables core
70   KCONFIG:=$(KCONFIG_IPT_CORE)
71   FILES:=$(foreach mod,$(IPT_CORE-m),$(LINUX_DIR)/net/$(mod).ko)
72   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_CORE-m)))
73   DEPENDS:=+kmod-nf-reject +kmod-nf-ipt
74 endef
75
76 define KernelPackage/ipt-core/description
77  Netfilter core kernel modules
78  Includes:
79  - comment
80  - limit
81  - LOG
82  - mac
83  - multiport
84  - REJECT
85  - TCPMSS
86 endef
87
88 $(eval $(call KernelPackage,ipt-core))
89
90
91 define KernelPackage/nf-conntrack
92   SUBMENU:=$(NF_MENU)
93   TITLE:=Netfilter connection tracking
94   KCONFIG:= \
95         CONFIG_NETFILTER=y \
96         CONFIG_NETFILTER_ADVANCED=y \
97         CONFIG_NF_CONNTRACK_MARK=y \
98         CONFIG_NF_CONNTRACK_ZONES=y \
99         $(KCONFIG_NF_CONNTRACK)
100   FILES:=$(foreach mod,$(NF_CONNTRACK-m),$(LINUX_DIR)/net/$(mod).ko)
101   AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_CONNTRACK-m)))
102 endef
103
104 $(eval $(call KernelPackage,nf-conntrack))
105
106
107 define KernelPackage/nf-conntrack6
108   SUBMENU:=$(NF_MENU)
109   TITLE:=Netfilter IPv6 connection tracking
110   KCONFIG:=$(KCONFIG_NF_CONNTRACK6)
111   DEPENDS:=@IPV6 +kmod-nf-conntrack
112   FILES:=$(foreach mod,$(NF_CONNTRACK6-m),$(LINUX_DIR)/net/$(mod).ko)
113   AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_CONNTRACK6-m)))
114 endef
115
116 $(eval $(call KernelPackage,nf-conntrack6))
117
118
119 define KernelPackage/nf-nat
120   SUBMENU:=$(NF_MENU)
121   TITLE:=Netfilter NAT
122   KCONFIG:=$(KCONFIG_NF_NAT)
123   DEPENDS:=+kmod-nf-conntrack
124   FILES:=$(foreach mod,$(NF_NAT-m),$(LINUX_DIR)/net/$(mod).ko)
125   AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_NAT-m)))
126 endef
127
128 $(eval $(call KernelPackage,nf-nat))
129
130
131 define KernelPackage/nf-nat6
132   SUBMENU:=$(NF_MENU)
133   TITLE:=Netfilter IPV6-NAT
134   KCONFIG:=$(KCONFIG_NF_NAT6)
135   DEPENDS:=+kmod-nf-conntrack6 +kmod-nf-nat
136   FILES:=$(foreach mod,$(NF_NAT6-m),$(LINUX_DIR)/net/$(mod).ko)
137   AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_NAT6-m)))
138 endef
139
140 $(eval $(call KernelPackage,nf-nat6))
141
142
143 define KernelPackage/nf-flow
144   SUBMENU:=$(NF_MENU)
145   TITLE:=Netfilter flowtable support
146   KCONFIG:= \
147         CONFIG_NETFILTER_INGRESS=y \
148         CONFIG_NF_FLOW_TABLE \
149         CONFIG_NF_FLOW_TABLE_HW
150   DEPENDS:=+kmod-nf-conntrack @!LINUX_3_18 @!LINUX_4_4 @!LINUX_4_9
151   FILES:= \
152         $(LINUX_DIR)/net/netfilter/nf_flow_table.ko
153   AUTOLOAD:=$(call AutoProbe,nf_flow_table)
154 endef
155
156 $(eval $(call KernelPackage,nf-flow))
157
158
159 define AddDepends/ipt
160   SUBMENU:=$(NF_MENU)
161   DEPENDS+= +kmod-ipt-core $(1)
162 endef
163
164
165 define KernelPackage/ipt-conntrack
166   TITLE:=Basic connection tracking modules
167   KCONFIG:=$(KCONFIG_IPT_CONNTRACK)
168   FILES:=$(foreach mod,$(IPT_CONNTRACK-m),$(LINUX_DIR)/net/$(mod).ko)
169   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_CONNTRACK-m)))
170   $(call AddDepends/ipt,+kmod-nf-conntrack)
171 endef
172
173 define KernelPackage/ipt-conntrack/description
174  Netfilter (IPv4) kernel modules for connection tracking
175  Includes:
176  - conntrack
177  - defrag
178  - iptables_raw
179  - NOTRACK
180  - state
181 endef
182
183 $(eval $(call KernelPackage,ipt-conntrack))
184
185
186 define KernelPackage/ipt-conntrack-extra
187   TITLE:=Extra connection tracking modules
188   KCONFIG:=$(KCONFIG_IPT_CONNTRACK_EXTRA)
189   FILES:=$(foreach mod,$(IPT_CONNTRACK_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
190   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_CONNTRACK_EXTRA-m)))
191   $(call AddDepends/ipt,+kmod-ipt-conntrack)
192 endef
193
194 define KernelPackage/ipt-conntrack-extra/description
195  Netfilter (IPv4) extra kernel modules for connection tracking
196  Includes:
197  - connbytes
198  - connmark/CONNMARK
199  - conntrack
200  - helper
201  - recent
202 endef
203
204 $(eval $(call KernelPackage,ipt-conntrack-extra))
205
206 define KernelPackage/ipt-conntrack-label
207   TITLE:=Module for handling connection tracking labels
208   KCONFIG:=$(KCONFIG_IPT_CONNTRACK_LABEL)
209   FILES:=$(foreach mod,$(IPT_CONNTRACK_LABEL-m),$(LINUX_DIR)/net/$(mod).ko)
210   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_CONNTRACK_LABEL-m)))
211   $(call AddDepends/ipt,+kmod-ipt-conntrack)
212 endef
213
214 define KernelPackage/ipt-conntrack-label/description
215  Netfilter (IPv4) module for handling connection tracking labels
216  Includes:
217  - connlabel
218 endef
219
220 $(eval $(call KernelPackage,ipt-conntrack-label))
221
222 define KernelPackage/ipt-filter
223   TITLE:=Modules for packet content inspection
224   KCONFIG:=$(KCONFIG_IPT_FILTER)
225   FILES:=$(foreach mod,$(IPT_FILTER-m),$(LINUX_DIR)/net/$(mod).ko)
226   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_FILTER-m)))
227   $(call AddDepends/ipt,+kmod-lib-textsearch +kmod-ipt-conntrack)
228 endef
229
230 define KernelPackage/ipt-filter/description
231  Netfilter (IPv4) kernel modules for packet content inspection
232  Includes:
233  - string
234 endef
235
236 $(eval $(call KernelPackage,ipt-filter))
237
238
239 define KernelPackage/ipt-offload
240   TITLE:=Netfilter routing/NAT offload support
241   KCONFIG:=CONFIG_NETFILTER_XT_TARGET_FLOWOFFLOAD
242   FILES:=$(foreach mod,$(IPT_FLOW-m),$(LINUX_DIR)/net/$(mod).ko)
243   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_FLOW-m)))
244   $(call AddDepends/ipt,+kmod-nf-flow)
245 endef
246
247 $(eval $(call KernelPackage,ipt-offload))
248
249
250 define KernelPackage/ipt-ipopt
251   TITLE:=Modules for matching/changing IP packet options
252   KCONFIG:=$(KCONFIG_IPT_IPOPT)
253   FILES:=$(foreach mod,$(IPT_IPOPT-m),$(LINUX_DIR)/net/$(mod).ko)
254   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_IPOPT-m)))
255   $(call AddDepends/ipt)
256 endef
257
258 define KernelPackage/ipt-ipopt/description
259  Netfilter (IPv4) modules for matching/changing IP packet options
260  Includes:
261  - CLASSIFY
262  - dscp/DSCP
263  - ecn/ECN
264  - hl/HL
265  - length
266  - mark/MARK
267  - statistic
268  - tcpmss
269  - time
270  - ttl/TTL
271  - unclean
272 endef
273
274 $(eval $(call KernelPackage,ipt-ipopt))
275
276
277 define KernelPackage/ipt-ipsec
278   TITLE:=Modules for matching IPSec packets
279   KCONFIG:=$(KCONFIG_IPT_IPSEC)
280   FILES:=$(foreach mod,$(IPT_IPSEC-m),$(LINUX_DIR)/net/$(mod).ko)
281   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_IPSEC-m)))
282   $(call AddDepends/ipt)
283 endef
284
285 define KernelPackage/ipt-ipsec/description
286  Netfilter (IPv4) modules for matching IPSec packets
287  Includes:
288  - ah
289  - esp
290  - policy
291 endef
292
293 $(eval $(call KernelPackage,ipt-ipsec))
294
295 IPSET_MODULES:= \
296         ipset/ip_set \
297         ipset/ip_set_bitmap_ip \
298         ipset/ip_set_bitmap_ipmac \
299         ipset/ip_set_bitmap_port \
300         ipset/ip_set_hash_ip \
301         ipset/ip_set_hash_ipmark \
302         ipset/ip_set_hash_ipport \
303         ipset/ip_set_hash_ipportip \
304         ipset/ip_set_hash_ipportnet \
305         ipset/ip_set_hash_mac \
306         ipset/ip_set_hash_netportnet \
307         ipset/ip_set_hash_net \
308         ipset/ip_set_hash_netnet \
309         ipset/ip_set_hash_netport \
310         ipset/ip_set_hash_netiface \
311         ipset/ip_set_list_set \
312         xt_set
313
314 define KernelPackage/ipt-ipset
315   SUBMENU:=Netfilter Extensions
316   TITLE:=IPset netfilter modules
317   DEPENDS+= +kmod-ipt-core +kmod-nfnetlink
318   KCONFIG:= \
319         CONFIG_IP_SET \
320         CONFIG_IP_SET_MAX=256 \
321         CONFIG_NETFILTER_XT_SET \
322         CONFIG_IP_SET_BITMAP_IP \
323         CONFIG_IP_SET_BITMAP_IPMAC \
324         CONFIG_IP_SET_BITMAP_PORT \
325         CONFIG_IP_SET_HASH_IP \
326         CONFIG_IP_SET_HASH_IPMARK \
327         CONFIG_IP_SET_HASH_IPPORT \
328         CONFIG_IP_SET_HASH_IPPORTIP \
329         CONFIG_IP_SET_HASH_IPPORTNET \
330         CONFIG_IP_SET_HASH_MAC \
331         CONFIG_IP_SET_HASH_NET \
332         CONFIG_IP_SET_HASH_NETNET \
333         CONFIG_IP_SET_HASH_NETIFACE \
334         CONFIG_IP_SET_HASH_NETPORT \
335         CONFIG_IP_SET_HASH_NETPORTNET \
336         CONFIG_IP_SET_LIST_SET \
337         CONFIG_NET_EMATCH_IPSET=n
338   FILES:=$(foreach mod,$(IPSET_MODULES),$(LINUX_DIR)/net/netfilter/$(mod).ko)
339   AUTOLOAD:=$(call AutoLoad,49,$(notdir $(IPSET_MODULES)))
340 endef
341 $(eval $(call KernelPackage,ipt-ipset))
342
343
344 define KernelPackage/ipt-nat
345   TITLE:=Basic NAT targets
346   KCONFIG:=$(KCONFIG_IPT_NAT)
347   FILES:=$(foreach mod,$(IPT_NAT-m),$(LINUX_DIR)/net/$(mod).ko)
348   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_NAT-m)))
349   $(call AddDepends/ipt,+kmod-nf-nat)
350 endef
351
352 define KernelPackage/ipt-nat/description
353  Netfilter (IPv4) kernel modules for basic NAT targets
354  Includes:
355  - MASQUERADE
356 endef
357
358 $(eval $(call KernelPackage,ipt-nat))
359
360
361 define KernelPackage/ipt-raw
362   TITLE:=Netfilter IPv4 raw table support
363   KCONFIG:=CONFIG_IP_NF_RAW
364   FILES:=$(LINUX_DIR)/net/ipv4/netfilter/iptable_raw.ko
365   AUTOLOAD:=$(call AutoProbe,iptable_raw)
366   $(call AddDepends/ipt)
367 endef
368
369 $(eval $(call KernelPackage,ipt-raw))
370
371
372 define KernelPackage/ipt-raw6
373   TITLE:=Netfilter IPv6 raw table support
374   KCONFIG:=CONFIG_IP6_NF_RAW
375   FILES:=$(LINUX_DIR)/net/ipv6/netfilter/ip6table_raw.ko
376   AUTOLOAD:=$(call AutoProbe,ip6table_raw)
377   $(call AddDepends/ipt,+kmod-ip6tables)
378 endef
379
380 $(eval $(call KernelPackage,ipt-raw6))
381
382
383 define KernelPackage/ipt-nat6
384   TITLE:=IPv6 NAT targets
385   KCONFIG:=$(KCONFIG_IPT_NAT6)
386   FILES:=$(foreach mod,$(IPT_NAT6-m),$(LINUX_DIR)/net/$(mod).ko)
387   AUTOLOAD:=$(call AutoLoad,43,$(notdir $(IPT_NAT6-m)))
388   $(call AddDepends/ipt,+kmod-nf-nat6)
389   $(call AddDepends/ipt,+kmod-ipt-conntrack)
390   $(call AddDepends/ipt,+kmod-ipt-nat)
391   $(call AddDepends/ipt,+kmod-ip6tables)
392 endef
393
394 define KernelPackage/ipt-nat6/description
395  Netfilter (IPv6) kernel modules for NAT targets
396 endef
397
398 $(eval $(call KernelPackage,ipt-nat6))
399
400
401 define KernelPackage/ipt-nat-extra
402   TITLE:=Extra NAT targets
403   KCONFIG:=$(KCONFIG_IPT_NAT_EXTRA)
404   FILES:=$(foreach mod,$(IPT_NAT_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
405   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_NAT_EXTRA-m)))
406   $(call AddDepends/ipt,+kmod-ipt-nat)
407 endef
408
409 define KernelPackage/ipt-nat-extra/description
410  Netfilter (IPv4) kernel modules for extra NAT targets
411  Includes:
412  - NETMAP
413  - REDIRECT
414 endef
415
416 $(eval $(call KernelPackage,ipt-nat-extra))
417
418
419 define KernelPackage/nf-nathelper
420   SUBMENU:=$(NF_MENU)
421   TITLE:=Basic Conntrack and NAT helpers
422   KCONFIG:=$(KCONFIG_NF_NATHELPER)
423   FILES:=$(foreach mod,$(NF_NATHELPER-m),$(LINUX_DIR)/net/$(mod).ko)
424   AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_NATHELPER-m)))
425   DEPENDS:=+kmod-nf-nat
426 endef
427
428 define KernelPackage/nf-nathelper/description
429  Default Netfilter (IPv4) Conntrack and NAT helpers
430  Includes:
431  - ftp
432 endef
433
434 $(eval $(call KernelPackage,nf-nathelper))
435
436
437 define KernelPackage/nf-nathelper-extra
438   SUBMENU:=$(NF_MENU)
439   TITLE:=Extra Conntrack and NAT helpers
440   KCONFIG:=$(KCONFIG_NF_NATHELPER_EXTRA)
441   FILES:=$(foreach mod,$(NF_NATHELPER_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
442   AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_NATHELPER_EXTRA-m)))
443   DEPENDS:=+kmod-nf-nat +kmod-lib-textsearch
444 endef
445
446 define KernelPackage/nf-nathelper-extra/description
447  Extra Netfilter (IPv4) Conntrack and NAT helpers
448  Includes:
449  - amanda
450  - h323
451  - irc
452  - mms
453  - pptp
454  - proto_gre
455  - sip
456  - snmp_basic
457  - tftp
458  - broadcast
459 endef
460
461 $(eval $(call KernelPackage,nf-nathelper-extra))
462
463
464 define KernelPackage/ipt-ulog
465   TITLE:=Module for user-space packet logging
466   KCONFIG:=$(KCONFIG_IPT_ULOG)
467   FILES:=$(foreach mod,$(IPT_ULOG-m),$(LINUX_DIR)/net/$(mod).ko)
468   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_ULOG-m)))
469   $(call AddDepends/ipt)
470 endef
471
472 define KernelPackage/ipt-ulog/description
473  Netfilter (IPv4) module for user-space packet logging
474  Includes:
475  - ULOG
476 endef
477
478 $(eval $(call KernelPackage,ipt-ulog))
479
480
481 define KernelPackage/ipt-nflog
482   TITLE:=Module for user-space packet logging
483   KCONFIG:=$(KCONFIG_IPT_NFLOG)
484   FILES:=$(foreach mod,$(IPT_NFLOG-m),$(LINUX_DIR)/net/$(mod).ko)
485   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_NFLOG-m)))
486   $(call AddDepends/ipt,+kmod-nfnetlink-log)
487 endef
488
489 define KernelPackage/ipt-nflog/description
490  Netfilter module for user-space packet logging
491  Includes:
492  - NFLOG
493 endef
494
495 $(eval $(call KernelPackage,ipt-nflog))
496
497
498 define KernelPackage/ipt-nfqueue
499   TITLE:=Module for user-space packet queuing
500   KCONFIG:=$(KCONFIG_IPT_NFQUEUE)
501   FILES:=$(foreach mod,$(IPT_NFQUEUE-m),$(LINUX_DIR)/net/$(mod).ko)
502   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_NFQUEUE-m)))
503   $(call AddDepends/ipt,+kmod-nfnetlink-queue)
504 endef
505
506 define KernelPackage/ipt-nfqueue/description
507  Netfilter module for user-space packet queuing
508  Includes:
509  - NFQUEUE
510 endef
511
512 $(eval $(call KernelPackage,ipt-nfqueue))
513
514
515 define KernelPackage/ipt-debug
516   TITLE:=Module for debugging/development
517   KCONFIG:=$(KCONFIG_IPT_DEBUG)
518   FILES:=$(foreach mod,$(IPT_DEBUG-m),$(LINUX_DIR)/net/$(mod).ko)
519   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_DEBUG-m)))
520   $(call AddDepends/ipt,+kmod-ipt-raw +IPV6:kmod-ipt-raw6)
521 endef
522
523 define KernelPackage/ipt-debug/description
524  Netfilter modules for debugging/development of the firewall
525  Includes:
526  - TRACE
527 endef
528
529 $(eval $(call KernelPackage,ipt-debug))
530
531
532 define KernelPackage/ipt-led
533   TITLE:=Module to trigger a LED with a Netfilter rule
534   KCONFIG:=$(KCONFIG_IPT_LED)
535   FILES:=$(foreach mod,$(IPT_LED-m),$(LINUX_DIR)/net/$(mod).ko)
536   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_LED-m)))
537   $(call AddDepends/ipt)
538 endef
539
540 define KernelPackage/ipt-led/description
541  Netfilter target to trigger a LED when a network packet is matched.
542 endef
543
544 $(eval $(call KernelPackage,ipt-led))
545
546 define KernelPackage/ipt-tproxy
547   TITLE:=Transparent proxying support
548   DEPENDS+=+kmod-ipt-conntrack +IPV6:kmod-nf-conntrack6 +IPV6:kmod-ip6tables
549   KCONFIG:= \
550         CONFIG_NETFILTER_XT_MATCH_SOCKET \
551         CONFIG_NETFILTER_XT_TARGET_TPROXY
552   FILES:= \
553         $(foreach mod,$(IPT_TPROXY-m),$(LINUX_DIR)/net/$(mod).ko)
554   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_TPROXY-m)))
555   $(call AddDepends/ipt)
556 endef
557
558 define KernelPackage/ipt-tproxy/description
559   Kernel modules for Transparent Proxying
560 endef
561
562 $(eval $(call KernelPackage,ipt-tproxy))
563
564 define KernelPackage/ipt-tee
565   TITLE:=TEE support
566   DEPENDS:=+kmod-ipt-conntrack
567   KCONFIG:= \
568         CONFIG_NETFILTER_XT_TARGET_TEE
569   FILES:= \
570         $(LINUX_DIR)/net/netfilter/xt_TEE.ko \
571         $(foreach mod,$(IPT_TEE-m),$(LINUX_DIR)/net/$(mod).ko)
572   AUTOLOAD:=$(call AutoProbe,$(notdir nf_tee $(IPT_TEE-m)))
573   $(call AddDepends/ipt)
574 endef
575
576 define KernelPackage/ipt-tee/description
577   Kernel modules for TEE
578 endef
579
580 $(eval $(call KernelPackage,ipt-tee))
581
582
583 define KernelPackage/ipt-u32
584   TITLE:=U32 support
585   KCONFIG:= \
586         CONFIG_NETFILTER_XT_MATCH_U32
587   FILES:= \
588         $(LINUX_DIR)/net/netfilter/xt_u32.ko \
589         $(foreach mod,$(IPT_U32-m),$(LINUX_DIR)/net/$(mod).ko)
590   AUTOLOAD:=$(call AutoProbe,$(notdir nf_tee $(IPT_U32-m)))
591   $(call AddDepends/ipt)
592 endef
593
594 define KernelPackage/ipt-u32/description
595   Kernel modules for U32
596 endef
597
598 $(eval $(call KernelPackage,ipt-u32))
599
600 define KernelPackage/ipt-checksum
601   TITLE:=CHECKSUM support
602   KCONFIG:= \
603         CONFIG_NETFILTER_XT_TARGET_CHECKSUM
604   FILES:= \
605         $(LINUX_DIR)/net/netfilter/xt_CHECKSUM.ko \
606         $(foreach mod,$(IPT_CHECKSUM-m),$(LINUX_DIR)/net/$(mod).ko)
607   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_CHECKSUM-m)))
608   $(call AddDepends/ipt)
609 endef
610
611 define KernelPackage/ipt-checksum/description
612   Kernel modules for CHECKSUM fillin target
613 endef
614
615 $(eval $(call KernelPackage,ipt-checksum))
616
617
618 define KernelPackage/ipt-iprange
619   TITLE:=Module for matching ip ranges
620   KCONFIG:=$(KCONFIG_IPT_IPRANGE)
621   FILES:=$(foreach mod,$(IPT_IPRANGE-m),$(LINUX_DIR)/net/$(mod).ko)
622   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_IPRANGE-m)))
623   $(call AddDepends/ipt)
624 endef
625
626 define KernelPackage/ipt-iprange/description
627  Netfilter (IPv4) module for matching ip ranges
628  Includes:
629  - iprange
630 endef
631
632 $(eval $(call KernelPackage,ipt-iprange))
633
634 define KernelPackage/ipt-cluster
635   TITLE:=Module for matching cluster
636   KCONFIG:=$(KCONFIG_IPT_CLUSTER)
637   FILES:=$(foreach mod,$(IPT_CLUSTER-m),$(LINUX_DIR)/net/$(mod).ko)
638   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_CLUSTER-m)))
639   $(call AddDepends/ipt)
640 endef
641
642 define KernelPackage/ipt-cluster/description
643  Netfilter (IPv4/IPv6) module for matching cluster
644  This option allows you to build work-load-sharing clusters of
645  network servers/stateful firewalls without having a dedicated
646  load-balancing router/server/switch. Basically, this match returns
647  true when the packet must be handled by this cluster node. Thus,
648  all nodes see all packets and this match decides which node handles
649  what packets. The work-load sharing algorithm is based on source
650  address hashing.
651
652  This module is usable for ipv4 and ipv6.
653
654  To use it also enable iptables-mod-cluster
655
656  see `iptables -m cluster --help` for more information.
657 endef
658
659 $(eval $(call KernelPackage,ipt-cluster))
660
661 define KernelPackage/ipt-clusterip
662   TITLE:=Module for CLUSTERIP
663   KCONFIG:=$(KCONFIG_IPT_CLUSTERIP)
664   FILES:=$(foreach mod,$(IPT_CLUSTERIP-m),$(LINUX_DIR)/net/$(mod).ko)
665   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_CLUSTERIP-m)))
666   $(call AddDepends/ipt,+kmod-nf-conntrack)
667 endef
668
669 define KernelPackage/ipt-clusterip/description
670  Netfilter (IPv4-only) module for CLUSTERIP
671  The CLUSTERIP target allows you to build load-balancing clusters of
672  network servers without having a dedicated load-balancing
673  router/server/switch.
674
675  To use it also enable iptables-mod-clusterip
676
677  see `iptables -j CLUSTERIP --help` for more information.
678 endef
679
680 $(eval $(call KernelPackage,ipt-clusterip))
681
682
683 define KernelPackage/ipt-extra
684   TITLE:=Extra modules
685   KCONFIG:=$(KCONFIG_IPT_EXTRA)
686   FILES:=$(foreach mod,$(IPT_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
687   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_EXTRA-m)))
688   $(call AddDepends/ipt,+kmod-br-netfilter)
689 endef
690
691 define KernelPackage/ipt-extra/description
692  Other Netfilter (IPv4) kernel modules
693  Includes:
694  - addrtype
695  - owner
696  - physdev (if bridge support was enabled in kernel)
697  - pkttype
698  - quota
699 endef
700
701 $(eval $(call KernelPackage,ipt-extra))
702
703
704 define KernelPackage/ip6tables
705   SUBMENU:=$(NF_MENU)
706   TITLE:=IPv6 modules
707   DEPENDS:=+kmod-nf-reject6 +kmod-nf-ipt6 +kmod-ipt-core
708   KCONFIG:=$(KCONFIG_IPT_IPV6)
709   FILES:=$(foreach mod,$(IPT_IPV6-m),$(LINUX_DIR)/net/$(mod).ko)
710   AUTOLOAD:=$(call AutoLoad,42,$(notdir $(IPT_IPV6-m)))
711 endef
712
713 define KernelPackage/ip6tables/description
714  Netfilter IPv6 firewalling support
715 endef
716
717 $(eval $(call KernelPackage,ip6tables))
718
719 define KernelPackage/ip6tables-extra
720   SUBMENU:=$(NF_MENU)
721   TITLE:=Extra IPv6 modules
722   DEPENDS:=+kmod-ip6tables
723   KCONFIG:=$(KCONFIG_IPT_IPV6_EXTRA)
724   FILES:=$(foreach mod,$(IPT_IPV6_EXTRA-m),$(LINUX_DIR)/net/$(mod).ko)
725   AUTOLOAD:=$(call AutoLoad,43,$(notdir $(IPT_IPV6_EXTRA-m)))
726 endef
727
728 define KernelPackage/ip6tables-extra/description
729  Netfilter IPv6 extra header matching modules
730 endef
731
732 $(eval $(call KernelPackage,ip6tables-extra))
733
734 ARP_MODULES = arp_tables arpt_mangle arptable_filter
735 define KernelPackage/arptables
736   SUBMENU:=$(NF_MENU)
737   TITLE:=ARP firewalling modules
738   DEPENDS:=+kmod-ipt-core
739   FILES:=$(LINUX_DIR)/net/ipv4/netfilter/arp*.ko
740   KCONFIG:=CONFIG_IP_NF_ARPTABLES \
741     CONFIG_IP_NF_ARPFILTER \
742     CONFIG_IP_NF_ARP_MANGLE
743   AUTOLOAD:=$(call AutoProbe,$(ARP_MODULES))
744 endef
745
746 define KernelPackage/arptables/description
747  Kernel modules for ARP firewalling
748 endef
749
750 $(eval $(call KernelPackage,arptables))
751
752
753 define KernelPackage/br-netfilter
754   SUBMENU:=$(NF_MENU)
755   TITLE:=Bridge netfilter support modules
756   HIDDEN:=1
757   DEPENDS:=+kmod-ipt-core
758   FILES:=$(LINUX_DIR)/net/bridge/br_netfilter.ko
759   KCONFIG:=CONFIG_BRIDGE_NETFILTER
760   AUTOLOAD:=$(call AutoProbe,br_netfilter)
761 endef
762
763 $(eval $(call KernelPackage,br-netfilter))
764
765
766 define KernelPackage/ebtables
767   SUBMENU:=$(NF_MENU)
768   TITLE:=Bridge firewalling modules
769   DEPENDS:=+kmod-ipt-core +kmod-br-netfilter
770   FILES:=$(foreach mod,$(EBTABLES-m),$(LINUX_DIR)/net/$(mod).ko)
771   KCONFIG:=$(KCONFIG_EBTABLES)
772   AUTOLOAD:=$(call AutoProbe,$(notdir $(EBTABLES-m)))
773 endef
774
775 define KernelPackage/ebtables/description
776   ebtables is a general, extensible frame/packet identification
777   framework. It provides you to do Ethernet
778   filtering/NAT/brouting on the Ethernet bridge.
779 endef
780
781 $(eval $(call KernelPackage,ebtables))
782
783
784 define AddDepends/ebtables
785   SUBMENU:=$(NF_MENU)
786   DEPENDS+=kmod-ebtables $(1)
787 endef
788
789
790 define KernelPackage/ebtables-ipv4
791   TITLE:=ebtables: IPv4 support
792   FILES:=$(foreach mod,$(EBTABLES_IP4-m),$(LINUX_DIR)/net/$(mod).ko)
793   KCONFIG:=$(KCONFIG_EBTABLES_IP4)
794   AUTOLOAD:=$(call AutoProbe,$(notdir $(EBTABLES_IP4-m)))
795   $(call AddDepends/ebtables)
796 endef
797
798 define KernelPackage/ebtables-ipv4/description
799  This option adds the IPv4 support to ebtables, which allows basic
800  IPv4 header field filtering, ARP filtering as well as SNAT, DNAT targets.
801 endef
802
803 $(eval $(call KernelPackage,ebtables-ipv4))
804
805
806 define KernelPackage/ebtables-ipv6
807   TITLE:=ebtables: IPv6 support
808   FILES:=$(foreach mod,$(EBTABLES_IP6-m),$(LINUX_DIR)/net/$(mod).ko)
809   KCONFIG:=$(KCONFIG_EBTABLES_IP6)
810   AUTOLOAD:=$(call AutoProbe,$(notdir $(EBTABLES_IP6-m)))
811   $(call AddDepends/ebtables)
812 endef
813
814 define KernelPackage/ebtables-ipv6/description
815  This option adds the IPv6 support to ebtables, which allows basic
816  IPv6 header field filtering and target support.
817 endef
818
819 $(eval $(call KernelPackage,ebtables-ipv6))
820
821
822 define KernelPackage/ebtables-watchers
823   TITLE:=ebtables: watchers support
824   FILES:=$(foreach mod,$(EBTABLES_WATCHERS-m),$(LINUX_DIR)/net/$(mod).ko)
825   KCONFIG:=$(KCONFIG_EBTABLES_WATCHERS)
826   AUTOLOAD:=$(call AutoProbe,$(notdir $(EBTABLES_WATCHERS-m)))
827   $(call AddDepends/ebtables)
828 endef
829
830 define KernelPackage/ebtables-watchers/description
831  This option adds the log watchers, that you can use in any rule
832  in any ebtables table.
833 endef
834
835 $(eval $(call KernelPackage,ebtables-watchers))
836
837
838 define KernelPackage/nfnetlink
839   SUBMENU:=$(NF_MENU)
840   TITLE:=Netlink-based userspace interface
841   FILES:=$(foreach mod,$(NFNETLINK-m),$(LINUX_DIR)/net/$(mod).ko)
842   KCONFIG:=$(KCONFIG_NFNETLINK)
843   AUTOLOAD:=$(call AutoProbe,$(notdir $(NFNETLINK-m)))
844 endef
845
846 define KernelPackage/nfnetlink/description
847  Kernel modules support for a netlink-based userspace interface
848 endef
849
850 $(eval $(call KernelPackage,nfnetlink))
851
852
853 define AddDepends/nfnetlink
854   SUBMENU:=$(NF_MENU)
855   DEPENDS+=+kmod-nfnetlink $(1)
856 endef
857
858
859 define KernelPackage/nfnetlink-log
860   TITLE:=Netfilter LOG over NFNETLINK interface
861   FILES:=$(foreach mod,$(NFNETLINK_LOG-m),$(LINUX_DIR)/net/$(mod).ko)
862   KCONFIG:=$(KCONFIG_NFNETLINK_LOG)
863   AUTOLOAD:=$(call AutoProbe,$(notdir $(NFNETLINK_LOG-m)))
864   $(call AddDepends/nfnetlink)
865 endef
866
867 define KernelPackage/nfnetlink-log/description
868  Kernel modules support for logging packets via NFNETLINK
869  Includes:
870  - NFLOG
871 endef
872
873 $(eval $(call KernelPackage,nfnetlink-log))
874
875
876 define KernelPackage/nfnetlink-queue
877   TITLE:=Netfilter QUEUE over NFNETLINK interface
878   FILES:=$(foreach mod,$(NFNETLINK_QUEUE-m),$(LINUX_DIR)/net/$(mod).ko)
879   KCONFIG:=$(KCONFIG_NFNETLINK_QUEUE)
880   AUTOLOAD:=$(call AutoProbe,$(notdir $(NFNETLINK_QUEUE-m)))
881   $(call AddDepends/nfnetlink)
882 endef
883
884 define KernelPackage/nfnetlink-queue/description
885  Kernel modules support for queueing packets via NFNETLINK
886  Includes:
887  - NFQUEUE
888 endef
889
890 $(eval $(call KernelPackage,nfnetlink-queue))
891
892
893 define KernelPackage/nf-conntrack-netlink
894   TITLE:=Connection tracking netlink interface
895   FILES:=$(LINUX_DIR)/net/netfilter/nf_conntrack_netlink.ko
896   KCONFIG:=CONFIG_NF_CT_NETLINK CONFIG_NF_CONNTRACK_EVENTS=y
897   AUTOLOAD:=$(call AutoProbe,nf_conntrack_netlink)
898   $(call AddDepends/nfnetlink,+kmod-ipt-conntrack)
899 endef
900
901 define KernelPackage/nf-conntrack-netlink/description
902  Kernel modules support for a netlink-based connection tracking
903  userspace interface
904 endef
905
906 $(eval $(call KernelPackage,nf-conntrack-netlink))
907
908 define KernelPackage/ipt-hashlimit
909   SUBMENU:=$(NF_MENU)
910   TITLE:=Netfilter hashlimit match
911   DEPENDS:=+kmod-ipt-core
912   KCONFIG:=$(KCONFIG_IPT_HASHLIMIT)
913   FILES:=$(LINUX_DIR)/net/netfilter/xt_hashlimit.ko
914   AUTOLOAD:=$(call AutoProbe,xt_hashlimit)
915   $(call KernelPackage/ipt)
916 endef
917
918 define KernelPackage/ipt-hashlimit/description
919  Kernel modules support for the hashlimit bucket match module
920 endef
921
922 $(eval $(call KernelPackage,ipt-hashlimit))
923
924 define KernelPackage/ipt-rpfilter
925   SUBMENU:=$(NF_MENU)
926   TITLE:=Netfilter rpfilter match
927   DEPENDS:=+kmod-ipt-core
928   KCONFIG:=$(KCONFIG_IPT_RPFILTER)
929   FILES:=$(realpath \
930         $(LINUX_DIR)/net/ipv4/netfilter/ipt_rpfilter.ko \
931         $(LINUX_DIR)/net/ipv6/netfilter/ip6t_rpfilter.ko)
932   AUTOLOAD:=$(call AutoProbe,ipt_rpfilter ip6t_rpfilter)
933   $(call KernelPackage/ipt)
934 endef
935
936 define KernelPackage/ipt-rpfilter/description
937  Kernel modules support for the Netfilter rpfilter match
938 endef
939
940 $(eval $(call KernelPackage,ipt-rpfilter))
941
942
943 define KernelPackage/nft-core
944   SUBMENU:=$(NF_MENU)
945   TITLE:=Netfilter nf_tables support
946   DEPENDS:=+kmod-nfnetlink +kmod-nf-reject +kmod-nf-reject6 +kmod-nf-conntrack6
947   FILES:=$(foreach mod,$(NFT_CORE-m),$(LINUX_DIR)/net/$(mod).ko)
948   AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_CORE-m)))
949   KCONFIG:= \
950         CONFIG_NFT_COMPAT=n \
951         CONFIG_NFT_QUEUE=n \
952         $(KCONFIG_NFT_CORE)
953 endef
954
955 define KernelPackage/nft-core/description
956  Kernel module support for nftables
957 endef
958
959 $(eval $(call KernelPackage,nft-core))
960
961
962 define KernelPackage/nft-arp
963   SUBMENU:=$(NF_MENU)
964   TITLE:=Netfilter nf_tables ARP table support
965   DEPENDS:=+kmod-nft-core
966   FILES:=$(foreach mod,$(NFT_ARP-m),$(LINUX_DIR)/net/$(mod).ko)
967   AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_ARP-m)))
968   KCONFIG:=$(KCONFIG_NFT_ARP)
969 endef
970
971 $(eval $(call KernelPackage,nft-arp))
972
973
974 define KernelPackage/nft-bridge
975   SUBMENU:=$(NF_MENU)
976   TITLE:=Netfilter nf_tables bridge table support
977   DEPENDS:=+kmod-nft-core
978   FILES:=$(foreach mod,$(NFT_BRIDGE-m),$(LINUX_DIR)/net/$(mod).ko)
979   AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_BRIDGE-m)))
980   KCONFIG:= \
981         CONFIG_NF_LOG_BRIDGE=n \
982         $(KCONFIG_NFT_BRIDGE)
983 endef
984
985 $(eval $(call KernelPackage,nft-bridge))
986
987
988 define KernelPackage/nft-nat
989   SUBMENU:=$(NF_MENU)
990   TITLE:=Netfilter nf_tables NAT support
991   DEPENDS:=+kmod-nft-core +kmod-nf-nat
992   FILES:=$(foreach mod,$(NFT_NAT-m),$(LINUX_DIR)/net/$(mod).ko)
993   AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_NAT-m)))
994   KCONFIG:=$(KCONFIG_NFT_NAT)
995 endef
996
997 $(eval $(call KernelPackage,nft-nat))
998
999
1000 define KernelPackage/nft-offload
1001   SUBMENU:=$(NF_MENU)
1002   TITLE:=Netfilter nf_tables routing/NAT offload support
1003   DEPENDS:=+kmod-nf-flow +kmod-nft-nat
1004   KCONFIG:= \
1005         CONFIG_NF_FLOW_TABLE_INET \
1006         CONFIG_NF_FLOW_TABLE_IPV4 \
1007         CONFIG_NF_FLOW_TABLE_IPV6 \
1008         CONFIG_NFT_FLOW_OFFLOAD
1009   FILES:= \
1010         $(LINUX_DIR)/net/netfilter/nf_flow_table_inet.ko \
1011         $(LINUX_DIR)/net/ipv4/netfilter/nf_flow_table_ipv4.ko \
1012         $(LINUX_DIR)/net/ipv6/netfilter/nf_flow_table_ipv6.ko \
1013         $(LINUX_DIR)/net/netfilter/nft_flow_offload.ko
1014   AUTOLOAD:=$(call AutoProbe,nf_flow_table_inet nf_flow_table_ipv4 nf_flow_table_ipv6 nft_flow_offload)
1015 endef
1016
1017 $(eval $(call KernelPackage,nft-offload))
1018
1019
1020 define KernelPackage/nft-nat6
1021   SUBMENU:=$(NF_MENU)
1022   TITLE:=Netfilter nf_tables IPv6-NAT support
1023   DEPENDS:=+kmod-nft-nat +kmod-nf-nat6
1024   FILES:=$(foreach mod,$(NFT_NAT6-m),$(LINUX_DIR)/net/$(mod).ko)
1025   AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_NAT6-m)))
1026   KCONFIG:=$(KCONFIG_NFT_NAT6)
1027 endef
1028
1029 $(eval $(call KernelPackage,nft-nat6))