Fix on multicast address check on teredo

This commit is contained in:
Luca Deri
2016-05-31 12:58:44 +02:00
parent 8c50b9692e
commit 2379443ef5
+1 -1
View File
@@ -30,7 +30,7 @@ void ndpi_search_teredo(struct ndpi_detection_module_struct *ndpi_struct, struct
if(packet->udp
&& packet->iph
&& ((ntohl(packet->iph->daddr) & 0xF0000000) != 0xE0000000 /* Not a multicast address */)
&& ((ntohl(packet->iph->daddr) & 0xF0000000) == 0xE0000000 /* A multicast address */)
&& ((ntohs(packet->udp->source) == 3544) || (ntohs(packet->udp->dest) == 3544))
&& (packet->payload_packet_len >= 40 /* IPv6 header */))
ndpi_int_change_protocol(ndpi_struct, flow, NDPI_PROTOCOL_TEREDO, NDPI_PROTOCOL_UNKNOWN);