forked from Mirrors/sngrep
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
This commit is contained in:
parent
4bec989cf7
commit
ebc2066ff0
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue