Fixed some false positivies with skype and stun-based protocols
This commit is contained in:
@@ -32,6 +32,12 @@ static void ndpi_check_skype(struct ndpi_detection_module_struct *ndpi_struct, s
|
||||
// const u_int8_t *packet_payload = packet->payload;
|
||||
u_int32_t payload_len = packet->payload_packet_len;
|
||||
|
||||
/* No need to do ntohl() with 0xFFFFFFFF */
|
||||
if(packet->iph && (packet->iph->daddr == 0xFFFFFFFF /* 255.255.255.255 */)) {
|
||||
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
|
||||
return;
|
||||
}
|
||||
|
||||
if(flow->host_server_name[0] != '\0')
|
||||
return;
|
||||
|
||||
|
||||
@@ -149,6 +149,12 @@ static ndpi_int_stun_t ndpi_int_check_stun(struct ndpi_detection_module_struct *
|
||||
if(flow->packet.tcp)
|
||||
return(NDPI_IS_NOT_STUN);
|
||||
|
||||
/* No need to do ntohl() with 0xFFFFFFFF */
|
||||
if(flow->packet.iph && (flow->packet.iph->daddr == 0xFFFFFFFF /* 255.255.255.255 */)) {
|
||||
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
|
||||
return(NDPI_IS_NOT_STUN);;
|
||||
}
|
||||
|
||||
if(payload_length >= 512) {
|
||||
return(NDPI_IS_NOT_STUN);
|
||||
} else if(payload_length < sizeof(struct stun_packet_header)) {
|
||||
|
||||
Reference in New Issue
Block a user