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