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

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