Blame SOURCES/0046-xtables-monitor-fix-packet-family-protocol.patch

082114
From d272e1225bf9b31ec0397bd86b39a54da49d5468 Mon Sep 17 00:00:00 2001
082114
From: Florian Westphal <fw@strlen.de>
082114
Date: Sat, 12 Dec 2020 16:15:33 +0100
082114
Subject: [PATCH] xtables-monitor: fix packet family protocol
082114
082114
This prints the family passed on the command line (which might be 0).
082114
Print the table family instead.
082114
082114
Signed-off-by: Florian Westphal <fw@strlen.de>
082114
(cherry picked from commit 946923b640afc2249cf98743ff60a97291108701)
082114
Signed-off-by: Phil Sutter <psutter@redhat.com>
082114
---
082114
 iptables/xtables-monitor.c | 4 ++--
082114
 1 file changed, 2 insertions(+), 2 deletions(-)
082114
082114
diff --git a/iptables/xtables-monitor.c b/iptables/xtables-monitor.c
082114
index 43b9064c3d30e..9fa1ca166a61e 100644
082114
--- a/iptables/xtables-monitor.c
082114
+++ b/iptables/xtables-monitor.c
082114
@@ -273,14 +273,14 @@ static void trace_print_packet(const struct nftnl_trace *nlt, struct cb_arg *arg
082114
 	uint32_t mark;
082114
 	char name[IFNAMSIZ];
082114
 
082114
-	printf("PACKET: %d %08x ", args->nfproto, nftnl_trace_get_u32(nlt, NFTNL_TRACE_ID));
082114
+	family = nftnl_trace_get_u32(nlt, NFTNL_TRACE_FAMILY);
082114
+	printf("PACKET: %d %08x ", family, nftnl_trace_get_u32(nlt, NFTNL_TRACE_ID));
082114
 
082114
 	if (nftnl_trace_is_set(nlt, NFTNL_TRACE_IIF))
082114
 		printf("IN=%s ", if_indextoname(nftnl_trace_get_u32(nlt, NFTNL_TRACE_IIF), name));
082114
 	if (nftnl_trace_is_set(nlt, NFTNL_TRACE_OIF))
082114
 		printf("OUT=%s ", if_indextoname(nftnl_trace_get_u32(nlt, NFTNL_TRACE_OIF), name));
082114
 
082114
-	family = nftnl_trace_get_u32(nlt, NFTNL_TRACE_FAMILY);
082114
 	nfproto = family;
082114
 	if (nftnl_trace_is_set(nlt, NFTNL_TRACE_NFPROTO)) {
082114
 		nfproto = nftnl_trace_get_u32(nlt, NFTNL_TRACE_NFPROTO);
082114
-- 
082114
2.31.1
082114