All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] trace: Fix incorrect ICMP code representation
@ 2026-11-25 19:54 Rohit Geetha Bal
  2026-11-26 20:49 ` Phil Sutter
  0 siblings, 1 reply; 4+ messages in thread
From: Rohit Geetha Bal @ 2026-11-25 19:54 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Rohit Geetha Bal

Fix incorrect ICMP code representation in packet trace output.

Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=222272
Signed-off-by: Rohit Geetha Bal <rohit.geetha-bal@telenor.se>
Tested-by: Rohit Geetha Bal <rohit.geetha-bal@telenor.se>
---
 src/trace.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/trace.c b/src/trace.c
index 051cc12d..ec7f9e5b 100644
--- a/src/trace.c
+++ b/src/trace.c
@@ -12,6 +12,7 @@
 #include <linux/netfilter/nf_tables.h>
 #include <linux/netfilter.h>
 
+#include <netinet/ip_icmp.h>
 #include <nftables.h>
 #include <mnl.h>
 #include <parser.h>
@@ -232,6 +233,10 @@ next:
 			payload_dependency_kill(pctx, lhs, ctx->family);
 		if (lhs->flags & EXPR_F_PROTOCOL)
 			payload_dependency_store(pctx, stmt, b);
+		if (desc == &proto_icmp &&
+		    payload_hdr_field(lhs) == ICMPHDR_CODE &&
+		    pctx->icmp_type == ICMP_ECHO)
+			expr_set_type(rel->right, &integer_type, lhs->byteorder);
 
 		goto next;
 	}
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-12-04 13:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25 19:54 [PATCH] trace: Fix incorrect ICMP code representation Rohit Geetha Bal
2026-11-26 20:49 ` Phil Sutter
2026-12-04 11:28   ` Geetha Bal Rohit (Telenor Sverige AB)
2026-12-04 13:41     ` Phil Sutter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.