Various optimizations to reduce not-necessary calls
Optimized various UDP dissectors Removed dead protocols such as pando and pplive
This commit is contained in:
@@ -165,8 +165,11 @@ static void ndpi_check_edonkey(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
return;
|
||||
}
|
||||
|
||||
if(payload_len == 0) return;
|
||||
|
||||
if(payload_len == 0) {
|
||||
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check if we so far detected the protocol in the request or not. */
|
||||
if(flow->edonkey_stage == 0) {
|
||||
NDPI_LOG_DBG2(ndpi_struct, "EDONKEY stage 0: \n");
|
||||
@@ -176,7 +179,8 @@ static void ndpi_check_edonkey(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
|
||||
/* Encode the direction of the packet in the stage, so we will know when we need to look for the response packet. */
|
||||
flow->edonkey_stage = packet->packet_direction + 1;
|
||||
}
|
||||
} else
|
||||
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
|
||||
} else {
|
||||
NDPI_LOG_DBG2(ndpi_struct, "EDONKEY stage %u: \n", flow->edonkey_stage);
|
||||
|
||||
@@ -193,8 +197,10 @@ static void ndpi_check_edonkey(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
NDPI_LOG_DBG2(ndpi_struct, "The reply did not seem to belong to EDONKEY, resetting the stage to 0\n");
|
||||
flow->edonkey_stage = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(flow->packet_counter > 5)
|
||||
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
|
||||
}
|
||||
|
||||
void ndpi_search_edonkey(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) {
|
||||
|
||||
Reference in New Issue
Block a user