Fixed false positives in Z39.50

This commit is contained in:
Luca Deri
2021-07-09 00:16:48 +02:00
parent bec8361638
commit 78b1295dc1
2 changed files with 51 additions and 56 deletions
+5
View File
@@ -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;