Blame SOURCES/0015-debug-dump-the-l2-protocol-stack.patch

b59ec1
From ed9b1e973f19f66cf08ea0db8947768f0240fa10 Mon Sep 17 00:00:00 2001
b59ec1
From: Phil Sutter <psutter@redhat.com>
b59ec1
Date: Thu, 9 Feb 2023 10:27:57 +0100
b59ec1
Subject: [PATCH] debug: dump the l2 protocol stack
b59ec1
b59ec1
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2094887
b59ec1
Upstream Status: nftables commit dbd5f348c71de
b59ec1
b59ec1
commit dbd5f348c71decf0baa8fb592c576f63fa232f50
b59ec1
Author: Florian Westphal <fw@strlen.de>
b59ec1
Date:   Mon Jul 25 16:42:23 2022 +0200
b59ec1
b59ec1
    debug: dump the l2 protocol stack
b59ec1
b59ec1
    Previously we used to print the cumulative size of the headers,
b59ec1
    update this to print the tracked l2 stack.
b59ec1
b59ec1
    Signed-off-by: Florian Westphal <fw@strlen.de>
b59ec1
b59ec1
Signed-off-by: Phil Sutter <psutter@redhat.com>
b59ec1
---
b59ec1
 src/proto.c | 6 ++++++
b59ec1
 1 file changed, 6 insertions(+)
b59ec1
b59ec1
diff --git a/src/proto.c b/src/proto.c
b59ec1
index 2663f21..c496482 100644
b59ec1
--- a/src/proto.c
b59ec1
+++ b/src/proto.c
b59ec1
@@ -154,6 +154,12 @@ static void proto_ctx_debug(const struct proto_ctx *ctx, enum proto_bases base,
b59ec1
 	if (!(debug_mask & NFT_DEBUG_PROTO_CTX))
b59ec1
 		return;
b59ec1
 
b59ec1
+	if (base == PROTO_BASE_LL_HDR && ctx->stacked_ll_count) {
b59ec1
+		pr_debug(" saved ll headers:");
b59ec1
+		for (i = 0; i < ctx->stacked_ll_count; i++)
b59ec1
+			pr_debug(" %s", ctx->stacked_ll[i]->name);
b59ec1
+	}
b59ec1
+
b59ec1
 	pr_debug("update %s protocol context:\n", proto_base_names[base]);
b59ec1
 	for (i = PROTO_BASE_LL_HDR; i <= PROTO_BASE_MAX; i++) {
b59ec1
 		pr_debug(" %-20s: %s",
b59ec1
-- 
b59ec1
2.39.1
b59ec1