diff options
Diffstat (limited to 'src/lib/ndpi_main.c')
-rw-r--r-- | src/lib/ndpi_main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index c4b8b2721..91dacd001 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -4260,7 +4260,10 @@ static int ndpi_init_packet_header(struct ndpi_detection_module_struct *ndpi_str u_int8_t backup; u_int16_t backup1, backup2; + u_int16_t packet_direction_counter[2]; + packet_direction_counter[0] = flow->packet_direction_counter[0]; + packet_direction_counter[1] = flow->packet_direction_counter[1]; backup = flow->num_processed_pkts; backup1 = flow->guessed_protocol_id; backup2 = flow->guessed_host_protocol_id; @@ -4268,6 +4271,8 @@ static int ndpi_init_packet_header(struct ndpi_detection_module_struct *ndpi_str memset(flow, 0, sizeof(*(flow))); /* Restore pointers */ + flow->packet_direction_counter[0] = packet_direction_counter[0]; + flow->packet_direction_counter[1] = packet_direction_counter[1]; flow->num_processed_pkts = backup; flow->guessed_protocol_id = backup1; flow->guessed_host_protocol_id = backup2; |