summaryrefslogtreecommitdiffstats
path: root/iptables/nft-arp.h
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2020-11-03 12:21:29 +0100
committerPhil Sutter <phil@nwl.cc>2020-12-03 00:27:51 +0100
commit44457c0805905ea22b4ecf9156648e774dd29155 (patch)
tree644a0370fe42b930d5d6e333fadd80a9581b5d2d /iptables/nft-arp.h
parent1bdb5535f561a4e065d766f0f4f41067e31c7281 (diff)
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 <phil@nwl.cc>
Diffstat (limited to 'iptables/nft-arp.h')
-rw-r--r--iptables/nft-arp.h7
1 files changed, 7 insertions, 0 deletions
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