From 44457c0805905ea22b4ecf9156648e774dd29155 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 3 Nov 2020 12:21:29 +0100 Subject: xtables-arp: Don't use ARPT_INV_* Arptables invflags are partly identical to IPT_INV_* ones but the bits are differently assigned. Eliminate this incompatibility by definition of the unique invflags in nft-arp.h on bits that don't collide with IPT_INV_* ones, then use those in combination with IPT_INV_* ones in arptables-specific code. Note that ARPT_INV_ARPPRO is replaced by IPT_INV_PROTO although these are in fact different options - yet since '-p' option is not supported by arptables, this does not lead to a collision. Signed-off-by: Phil Sutter --- iptables/nft-arp.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'iptables/nft-arp.h') diff --git a/iptables/nft-arp.h b/iptables/nft-arp.h index 3411fc3d..0d93a31f 100644 --- a/iptables/nft-arp.h +++ b/iptables/nft-arp.h @@ -4,4 +4,11 @@ extern char *arp_opcodes[]; #define NUMOPCODES 9 +/* define invflags which won't collide with IPT ones */ +#define IPT_INV_SRCDEVADDR 0x0080 +#define IPT_INV_TGTDEVADDR 0x0100 +#define IPT_INV_ARPHLN 0x0200 +#define IPT_INV_ARPOP 0x0400 +#define IPT_INV_ARPHRD 0x0800 + #endif -- cgit v1.2.3