From ebc2066ff0372168a1b9721fabfa0f283d12412b Mon Sep 17 00:00:00 2001 From: FIRST_NAME LAST_NAME Date: Thu, 11 Nov 2021 16:37:21 +0100 Subject: [PATCH] packet: properly set packet type on cloned packets Sometimes during TCP assembly, a new packet is created from one of the fragments, cloning its data. The field type, used to print the Transport column was not being properly copied from the original packet. Fixes #378 --- src/packet.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/packet.c b/src/packet.c index 0c7ca80..4d61c71 100644 --- a/src/packet.c +++ b/src/packet.c @@ -56,6 +56,7 @@ packet_clone(packet_t *packet) // Create a new packet with the original information clone = packet_create(packet->ip_version, packet->proto, packet->src, packet->dst, packet->ip_id); clone->tcp_seq = packet->tcp_seq; + clone->type = packet->type; // Append this frames to the original packet vector_iter_t frames = vector_iterator(packet->frames);