Simplified IPv6 datatypes
This commit is contained in:
@@ -8050,6 +8050,7 @@ ndpi_protocol_match host_match[] = {
|
||||
{ ".cnn.net", "CNN", NDPI_PROTOCOL_CNN, NDPI_PROTOCOL_CATEGORY_WEB, NDPI_PROTOCOL_SAFE },
|
||||
|
||||
{ ".dropbox.com", "DropBox", NDPI_PROTOCOL_DROPBOX, NDPI_PROTOCOL_CATEGORY_CLOUD, NDPI_PROTOCOL_ACCEPTABLE },
|
||||
{ ".dropboxstatic.com", "DropBox", NDPI_PROTOCOL_DROPBOX, NDPI_PROTOCOL_CATEGORY_CLOUD, NDPI_PROTOCOL_ACCEPTABLE },
|
||||
{ ".dropbox-dns.com", "DropBox", NDPI_PROTOCOL_DROPBOX, NDPI_PROTOCOL_CATEGORY_CLOUD, NDPI_PROTOCOL_ACCEPTABLE },
|
||||
{ "log.getdropbox.com", "DropBox", NDPI_PROTOCOL_DROPBOX, NDPI_PROTOCOL_CATEGORY_CLOUD, NDPI_PROTOCOL_ACCEPTABLE },
|
||||
|
||||
|
||||
+4
-4
@@ -3020,10 +3020,10 @@ static u_int8_t ndpi_detection_get_l4_internal(struct ndpi_detection_module_stru
|
||||
l4protocol = iph->protocol;
|
||||
}
|
||||
#ifdef NDPI_DETECTION_SUPPORT_IPV6
|
||||
else if(iph_v6 != NULL && (l3_len - sizeof(struct ndpi_ipv6hdr)) >= ntohs(iph_v6->ip6_ctlun.ip6_un1.ip6_un1_plen)) {
|
||||
else if(iph_v6 != NULL && (l3_len - sizeof(struct ndpi_ipv6hdr)) >= ntohs(iph_v6->ip6_hdr.ip6_un1_plen)) {
|
||||
l4ptr = (((const u_int8_t *) iph_v6) + sizeof(struct ndpi_ipv6hdr));
|
||||
l4len = ntohs(iph_v6->ip6_ctlun.ip6_un1.ip6_un1_plen);
|
||||
l4protocol = iph_v6->ip6_ctlun.ip6_un1.ip6_un1_nxt;
|
||||
l4len = ntohs(iph_v6->ip6_hdr.ip6_un1_plen);
|
||||
l4protocol = iph_v6->ip6_hdr.ip6_un1_nxt;
|
||||
|
||||
// we need to handle IPv6 extension headers if present
|
||||
if(ndpi_handle_ipv6_extension_headers(ndpi_struct, &l4ptr, &l4len, &l4protocol) != 0) {
|
||||
@@ -3660,7 +3660,7 @@ ndpi_protocol ndpi_detection_process_packet(struct ndpi_detection_module_struct
|
||||
|
||||
#ifdef NDPI_DETECTION_SUPPORT_IPV6
|
||||
if(flow->packet.iphv6 != NULL) {
|
||||
protocol = flow->packet.iphv6->ip6_ctlun.ip6_un1.ip6_un1_nxt;
|
||||
protocol = flow->packet.iphv6->ip6_hdr.ip6_un1_nxt;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
|
||||
@@ -74,7 +74,7 @@ void ndpi_search_tcp_or_udp(struct ndpi_detection_module_struct *ndpi_struct, st
|
||||
flow,
|
||||
flow->packet.iph ? flow->packet.iph->protocol :
|
||||
#ifdef NDPI_DETECTION_SUPPORT_IPV6
|
||||
flow->packet.iphv6->ip6_ctlun.ip6_un1.ip6_un1_nxt,
|
||||
flow->packet.iphv6->ip6_hdr.ip6_un1_nxt,
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user