Remove detected_protocol_stack field from ndpi_packet_struct (#1317)
This field is an exact copy of `ndpi_flow_struct->detected_protocol_stack[2]`: * at the very beginning of packet dissection, the value saved in `flow->detected_protocol_stack` is copied in `packet->detected_protocol_stack` (via `ndpi_detection_process_packet()` -> `ndpi_init_packet_header()`) * every time we update `flow->detected_protocol_stack` we update `packet->detected_protocol_stack` too (via `ndpi_int_change_protocol()` -> `ndpi_int_change_packet_protocol()`) These two fields are always in sync: keeping the same value in two different places is useless.
This commit is contained in:
@@ -115,7 +115,7 @@ u_int8_t ndpi_check_starcraft_udp(struct ndpi_detection_module_struct* ndpi_stru
|
||||
void ndpi_search_starcraft(struct ndpi_detection_module_struct* ndpi_struct, struct ndpi_flow_struct* flow)
|
||||
{
|
||||
NDPI_LOG_DBG(ndpi_struct, "search Starcraft\n");
|
||||
if (flow->packet.detected_protocol_stack[0] != NDPI_PROTOCOL_STARCRAFT) {
|
||||
if (flow->detected_protocol_stack[0] != NDPI_PROTOCOL_STARCRAFT) {
|
||||
struct ndpi_packet_struct* packet = &flow->packet;
|
||||
int8_t result = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user