aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--example/ndpiReader.c10
-rw-r--r--src/lib/ndpi_content_match.c.inc5
2 files changed, 9 insertions, 6 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
index 0d473f58a..e2cc162fb 100644
--- a/example/ndpiReader.c
+++ b/example/ndpiReader.c
@@ -1640,7 +1640,6 @@ static void pcap_packet_callback(u_char *args,
datalink_check:
switch(datalink_type) {
-
case DLT_NULL :
if(ntohl(*((u_int32_t*)&packet[eth_offset])) == 2)
type = ETH_P_IP;
@@ -1725,7 +1724,12 @@ static void pcap_packet_callback(u_char *args,
ip_offset = wifi_len + radio_len + sizeof(struct ndpi_llc_header) + eth_offset;
break;
+ case DLT_RAW:
+ ip_offset = eth_offset = 0;
+ break;
+
default:
+ printf("Unknown datalink %d\n", datalink_type);
return;
}
@@ -1735,9 +1739,7 @@ static void pcap_packet_callback(u_char *args,
type = (packet[ip_offset+2] << 8) + packet[ip_offset+3];
ip_offset += 4;
vlan_packet = 1;
- }
- else if(type == MPLS_UNI || type == MPLS_MULTI) {
-
+ } else if(type == MPLS_UNI || type == MPLS_MULTI) {
mpls = (struct ndpi_mpls_header *) &packet[ip_offset];
label = ntohl(mpls->label);
/* label = ntohl(*((u_int32_t*)&packet[ip_offset])); */
diff --git a/src/lib/ndpi_content_match.c.inc b/src/lib/ndpi_content_match.c.inc
index 8362dd5b7..26a07c680 100644
--- a/src/lib/ndpi_content_match.c.inc
+++ b/src/lib/ndpi_content_match.c.inc
@@ -63,10 +63,11 @@ static ndpi_network host_protocol_list[] = {
Dropbox
108.160.160.0/20
199.47.216.0/22
+ 45.58.64.0/20
*/
{ 0x6CA0A000 /* 108.160.160.0 */, 20, NDPI_PROTOCOL_DROPBOX },
{ 0xC72FD800 /* 199.47.216.0 */, 22, NDPI_PROTOCOL_DROPBOX },
- { 0x6CA0A000 /* 108.160.160.0 */, 20, NDPI_PROTOCOL_DROPBOX },
+ { 0x2D3A4000 /* 45.58.64.0 */, 20, NDPI_PROTOCOL_DROPBOX },
/*
Skype (Microsoft CDN)
@@ -7320,7 +7321,7 @@ ndpi_protocol_match host_match[] = {
{ ".cnn.c", "CNN", NDPI_SERVICE_CNN, NDPI_PROTOCOL_FUN },
{ ".cnn.net", "CNN", NDPI_SERVICE_CNN, NDPI_PROTOCOL_FUN },
{ ".dropbox.com", "DropBox", NDPI_SERVICE_DROPBOX, NDPI_PROTOCOL_SAFE },
- { ".ebay.", "eBay", NDPI_SERVICE_EBAY, NDPI_PROTOCOL_ACCEPTABLE },
+ { ".ebay.", "eBay", NDPI_SERVICE_EBAY, NDPI_PROTOCOL_ACCEPTABLE },
{ ".ebay.com", "eBay", NDPI_SERVICE_EBAY, NDPI_PROTOCOL_ACCEPTABLE },
{ ".ebaystatic.com", "eBay", NDPI_SERVICE_EBAY, NDPI_PROTOCOL_ACCEPTABLE },
{ ".ebaydesc.com", "eBay", NDPI_SERVICE_EBAY, NDPI_PROTOCOL_ACCEPTABLE },