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 Tested-by: Rohit Geetha Bal --- 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 #include +#include #include #include #include @@ -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