aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/dns.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2021-07-23 17:26:56 +0200
committerLuca Deri <deri@ntop.org>2021-07-23 17:27:15 +0200
commit61fc5be202f05113de07c063fa3fc9ccc47625d8 (patch)
treee7cb3b63e579a5f7c072de7c8836bd3aace04b33 /src/lib/protocols/dns.c
parent4ffe1eb3c00d59fe746f4668ec9c6b3726848fce (diff)
Reworked flow risk implementation
Diffstat (limited to 'src/lib/protocols/dns.c')
-rw-r--r--src/lib/protocols/dns.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/protocols/dns.c b/src/lib/protocols/dns.c
index 07d129ea1..5e1f100cc 100644
--- a/src/lib/protocols/dns.c
+++ b/src/lib/protocols/dns.c
@@ -89,7 +89,7 @@ static void ndpi_check_dns_type(struct ndpi_detection_module_struct *ndpi_struct
case 106:
case 107:
case 259:
- ndpi_set_risk(flow, NDPI_DNS_SUSPICIOUS_TRAFFIC);
+ ndpi_set_risk(ndpi_struct, flow, NDPI_DNS_SUSPICIOUS_TRAFFIC);
break;
}
}
@@ -194,7 +194,7 @@ static int search_valid_dns(struct ndpi_detection_module_struct *ndpi_struct,
else if((dns_header->flags & FLAGS_MASK) == 0x8000)
*is_query = 0;
else {
- ndpi_set_risk(flow, NDPI_MALFORMED_PACKET);
+ ndpi_set_risk(ndpi_struct, flow, NDPI_MALFORMED_PACKET);
return(1 /* invalid */);
}
@@ -219,7 +219,7 @@ static int search_valid_dns(struct ndpi_detection_module_struct *ndpi_struct,
x++;
}
} else {
- ndpi_set_risk(flow, NDPI_MALFORMED_PACKET);
+ ndpi_set_risk(ndpi_struct, flow, NDPI_MALFORMED_PACKET);
return(1 /* invalid */);
}
} else {
@@ -419,7 +419,7 @@ static void ndpi_search_dns(struct ndpi_detection_module_struct *ndpi_struct, st
#ifdef DNS_DEBUG
printf("[DNS] Invalid query len [%u >= %u]\n", i+4, flow->packet.payload_packet_len);
#endif
- ndpi_set_risk(flow, NDPI_MALFORMED_PACKET);
+ ndpi_set_risk(ndpi_struct, flow, NDPI_MALFORMED_PACKET);
break;
} else {
idx = i+5, num_queries++;