Blame SOURCES/0040-arptables-nft-Set-h-type-h-length-masks-by-default-t.patch

8cce6c
From 5ca3f6f4c4e673ecfab59ca81edd8bec69a7f43b Mon Sep 17 00:00:00 2001
8cce6c
From: Phil Sutter <phil@nwl.cc>
8cce6c
Date: Fri, 1 Feb 2019 17:06:18 +0100
8cce6c
Subject: [PATCH] arptables-nft: Set h-type/h-length masks by default, too
8cce6c
8cce6c
These masks are not used in nftables backend, but mangle extension
8cce6c
checks arhln_mask value to make sure --h-length was given (which is
8cce6c
implicitly the case).
8cce6c
8cce6c
Fixes: 5aecb2d8bfdda ("arptables: pre-init hlen and ethertype")
8cce6c
Signed-off-by: Phil Sutter <phil@nwl.cc>
8cce6c
Signed-off-by: Florian Westphal <fw@strlen.de>
8cce6c
(cherry picked from commit a1da179b0ff3783badca352a42808f4398dd1a98)
8cce6c
Signed-off-by: Phil Sutter <psutter@redhat.com>
8cce6c
---
8cce6c
 iptables/xtables-arp.c | 8 ++++++--
8cce6c
 1 file changed, 6 insertions(+), 2 deletions(-)
8cce6c
8cce6c
diff --git a/iptables/xtables-arp.c b/iptables/xtables-arp.c
8cce6c
index 819e7e6c94034..2dce1a52f16fd 100644
8cce6c
--- a/iptables/xtables-arp.c
8cce6c
+++ b/iptables/xtables-arp.c
8cce6c
@@ -909,8 +909,12 @@ int do_commandarp(struct nft_handle *h, int argc, char *argv[], char **table,
8cce6c
 {
8cce6c
 	struct iptables_command_state cs = {
8cce6c
 		.jumpto = "",
8cce6c
-		.arp.arp.arhln = 6,
8cce6c
-		.arp.arp.arhrd = htons(ARPHRD_ETHER),
8cce6c
+		.arp.arp = {
8cce6c
+			.arhln = 6,
8cce6c
+			.arhln_mask = 255,
8cce6c
+			.arhrd = htons(ARPHRD_ETHER),
8cce6c
+			.arhrd_mask = 65535,
8cce6c
+		},
8cce6c
 	};
8cce6c
 	int invert = 0;
8cce6c
 	unsigned int nsaddrs = 0, ndaddrs = 0;
8cce6c
-- 
8cce6c
2.20.1
8cce6c