Skip to content

Commit

Permalink
Merge pull request #12 from ntop/dev
Browse files Browse the repository at this point in the history
sync
  • Loading branch information
SalvatoreCostantino authored Apr 2, 2019
2 parents bece7b6 + 208838e commit 6d8bb7e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Flow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,9 @@ void Flow::setDetectedProtocol(ndpi_protocol proto_id, bool forceDetection) {
if(ndpiDetectedProtocol.category == CUSTOM_CATEGORY_MALWARE) {
char buf[512];
print(buf, sizeof(buf));
snprintf(&buf[strlen(buf)], sizeof(buf) - strlen(buf), "Malware category detected. [cli_blacklisted: %u][srv_blacklisted: %u][category: %s]", cli_host->isBlacklisted(), srv_host->isBlacklisted(), get_protocol_category_name());
snprintf(&buf[strlen(buf)], sizeof(buf) - strlen(buf),
"Malware category detected. [cli_blacklisted: %u][srv_blacklisted: %u][category: %s]",
cli_host->isBlacklisted(), srv_host->isBlacklisted(), get_protocol_category_name());
ntop->getTrace()->traceEvent(TRACE_NORMAL, "%s", buf);
}
#endif
Expand Down Expand Up @@ -2303,6 +2305,7 @@ void Flow::housekeep(time_t t) {
&& iface->get_ndpi_struct()
&& get_ndpi_flow()) {
ndpi_protocol givenup_protocol = ndpi_detection_giveup(iface->get_ndpi_struct(), get_ndpi_flow(), 1);

setDetectedProtocol(givenup_protocol, true);
}
}
Expand Down

0 comments on commit 6d8bb7e

Please sign in to comment.