Skip to content

Commit 4654467

Browse files
author
Florian Westphal
committed
netfilter: arptables: allow xtables-nft only builds
Allows to build kernel that supports the arptables mangle target via nftables' compat infra but without the arptables get/setsockopt interface or the old arptables filter interpreter. IOW, setting IP_NF_ARPFILTER=n will break arptables-legacy, but arptables-nft will continue to work as long as nftables compat support is enabled. Signed-off-by: Florian Westphal <fw@strlen.de> Reviewed-by: Phil Sutter <phil@nwl.cc>
1 parent d5f9142 commit 4654467

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

net/ipv4/netfilter/Kconfig

+13-15
Original file line numberDiff line numberDiff line change
@@ -309,36 +309,34 @@ endif # IP_NF_IPTABLES
309309

310310
# ARP tables
311311
config IP_NF_ARPTABLES
312-
tristate "ARP tables support"
313-
select NETFILTER_XTABLES
314-
select NETFILTER_FAMILY_ARP
315-
depends on NETFILTER_ADVANCED
316-
help
317-
arptables is a general, extensible packet identification framework.
318-
The ARP packet filtering and mangling (manipulation)subsystems
319-
use this: say Y or M here if you want to use either of those.
320-
321-
To compile it as a module, choose M here. If unsure, say N.
312+
tristate
322313

323-
if IP_NF_ARPTABLES
314+
config NFT_COMPAT_ARP
315+
tristate
316+
depends on NF_TABLES_ARP && NFT_COMPAT
317+
default m if NFT_COMPAT=m
318+
default y if NFT_COMPAT=y
324319

325320
config IP_NF_ARPFILTER
326-
tristate "ARP packet filtering"
321+
tristate "arptables-legacy packet filtering support"
322+
select IP_NF_ARPTABLES
327323
help
328324
ARP packet filtering defines a table `filter', which has a series of
329325
rules for simple ARP packet filtering at local input and
330-
local output. On a bridge, you can also specify filtering rules
331-
for forwarded ARP packets. See the man page for arptables(8).
326+
local output. This is only needed for arptables-legacy(8).
327+
Neither arptables-nft nor nftables need this to work.
332328

333329
To compile it as a module, choose M here. If unsure, say N.
334330

335331
config IP_NF_ARP_MANGLE
336332
tristate "ARP payload mangling"
333+
depends on IP_NF_ARPTABLES || NFT_COMPAT_ARP
337334
help
338335
Allows altering the ARP packet payload: source and destination
339336
hardware and network addresses.
340337

341-
endif # IP_NF_ARPTABLES
338+
This option is needed by both arptables-legacy and arptables-nft.
339+
It is not used by nftables.
342340

343341
endmenu
344342

0 commit comments

Comments
 (0)