Improved skype, teredo, netbios heuristics
Changed ndpi_detection_giveup() API: guess is now part of the call
This commit is contained in:
@@ -330,9 +330,8 @@ void ndpi_search_netbios(struct ndpi_detection_module_struct *ndpi_struct, struc
|
||||
|
||||
NDPI_LOG_DBG2(ndpi_struct, "found netbios port 138 and payload length >= 112 \n");
|
||||
|
||||
if(packet->payload[0] >= 0x11 && packet->payload[0] <= 0x16) {
|
||||
|
||||
NDPI_LOG_DBG2(ndpi_struct, "found netbios with MSG-type 0x11,0x12,0x13,0x14,0x15 or 0x16\n");
|
||||
if(packet->payload[0] >= 0x10 && packet->payload[0] <= 0x16) {
|
||||
NDPI_LOG_DBG2(ndpi_struct, "found netbios with MSG-type 0x10,0x11,0x12,0x13,0x14,0x15 or 0x16\n");
|
||||
|
||||
if(ntohl(get_u_int32_t(packet->payload, 4)) == ntohl(packet->iph->saddr)) {
|
||||
NDPI_LOG_INFO(ndpi_struct, "found netbios with checked ip-address\n");
|
||||
|
||||
@@ -66,7 +66,7 @@ static void ndpi_check_skype(struct ndpi_detection_module_struct *ndpi_struct, s
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
// return;
|
||||
}
|
||||
|
||||
NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
|
||||
|
||||
@@ -32,7 +32,7 @@ void ndpi_search_teredo(struct ndpi_detection_module_struct *ndpi_struct, struct
|
||||
NDPI_LOG_DBG(ndpi_struct,"search teredo\n");
|
||||
if(packet->udp
|
||||
&& packet->iph
|
||||
&& ((ntohl(packet->iph->daddr) & 0xF0000000) == 0xE0000000 /* A multicast address */)
|
||||
&& ((ntohl(packet->iph->daddr) & 0xF0000000) != 0xE0000000 /* Not a multicast address */)
|
||||
&& ((ntohs(packet->udp->source) == 3544) || (ntohs(packet->udp->dest) == 3544))
|
||||
&& (packet->payload_packet_len >= 40 /* IPv6 header */)) {
|
||||
NDPI_LOG_INFO(ndpi_struct,"found teredo\n");
|
||||
|
||||
Reference in New Issue
Block a user