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

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