]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #4890: decoder: improved decoding fails error message on tracer
authorOleksandr Fedorych -X (ofedoryc - SOFTSERVE INC at Cisco) <ofedoryc@cisco.com>
Fri, 5 Sep 2025 23:48:47 +0000 (23:48 +0000)
committerRayen Mohanty (ramohant) <ramohant@cisco.com>
Fri, 5 Sep 2025 23:48:47 +0000 (23:48 +0000)
Merge in SNORT/snort3 from ~OFEDORYC/snort3:gtp-improved-logs to master

Squashed commit of the following:

commit d5b51d1f8e9d088b99a5f72c9a90606c67bd081e
Author: ofedoryc <ofedoryc@cisco.com>
Date:   Wed Sep 3 06:22:20 2025 -0400

    decoder: improved decoding fails error message on tracer

src/protocols/packet_manager.cc

index 1a67f05aae5b55dd431d0333589f506972b4e081..7d76a965d5ac4fa8cf8c2d1f45ec1d1430f8f238 100644 (file)
@@ -173,7 +173,10 @@ void PacketManager::handle_decode_failure(Packet* p, RawData& raw, const CodecDa
     // if the codec exists, it failed
     if (CodecManager::s_proto_map[to_utype(prev_prot_id)])
     {
-        PacketTracer::log_msg_only("Packet %" PRIu64": decoding error\n", p->context->packet_number);
+        PacketTracer::log_msg_only("Packet %" PRIu64": unable to decode as %s%s\n",
+            p->context->packet_number,
+            get_proto_name(prev_prot_id),
+            (prev_prot_id == ProtocolId::GTP) ? "-u" : "");
         s_stats[discards]++;
     }
     else