diff --git a/nDPId.c b/nDPId.c index a4e488688..9dd482489 100644 --- a/nDPId.c +++ b/nDPId.c @@ -1558,8 +1558,6 @@ static void ndpi_process_packet(uint8_t * const args, flow_to_process->min_l4_data_len = l4_len; } - jsonize_packet_event(reader_thread, header, packet, flow_to_process, PACKET_EVENT_PAYLOAD_FLOW); - if (is_new_flow != 0) { flow_to_process->max_l4_data_len = l4_len; @@ -1567,6 +1565,8 @@ static void ndpi_process_packet(uint8_t * const args, jsonize_flow_event(reader_thread, flow_to_process, FLOW_EVENT_NEW); } + jsonize_packet_event(reader_thread, header, packet, flow_to_process, PACKET_EVENT_PAYLOAD_FLOW); + /* TCP-FIN: indicates that at least one side wants to end the connection */ if (flow.flow_fin_ack_seen != 0 && flow_to_process->flow_fin_ack_seen == 0) {