]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
debug: dump the l2 protocol stack
authorFlorian Westphal <fw@strlen.de>
Mon, 25 Jul 2022 14:42:23 +0000 (16:42 +0200)
committerFlorian Westphal <fw@strlen.de>
Thu, 4 Aug 2022 23:46:39 +0000 (01:46 +0200)
Previously we used to print the cumulative size of the headers,
update this to print the tracked l2 stack.

Signed-off-by: Florian Westphal <fw@strlen.de>
src/proto.c

index 22055fcf71aa87be4149a4eb2557967cc5380d9e..c8b3361bbee6a9348c15489b94d50461addb716e 100644 (file)
@@ -154,6 +154,12 @@ static void proto_ctx_debug(const struct proto_ctx *ctx, enum proto_bases base,
        if (!(debug_mask & NFT_DEBUG_PROTO_CTX))
                return;
 
+       if (base == PROTO_BASE_LL_HDR && ctx->stacked_ll_count) {
+               pr_debug(" saved ll headers:");
+               for (i = 0; i < ctx->stacked_ll_count; i++)
+                       pr_debug(" %s", ctx->stacked_ll[i]->name);
+       }
+
        pr_debug("update %s protocol context:\n", proto_base_names[base]);
        for (i = PROTO_BASE_LL_HDR; i <= PROTO_BASE_MAX; i++) {
                pr_debug(" %-20s: %s",