Fix compilation with clang-13 or if some debug macros are enabled (#1326)
This commit is contained in:
@@ -2915,7 +2915,6 @@ static void printFlowsStats() {
|
|||||||
*/
|
*/
|
||||||
static void printResults(u_int64_t processing_time_usec, u_int64_t setup_time_usec) {
|
static void printResults(u_int64_t processing_time_usec, u_int64_t setup_time_usec) {
|
||||||
u_int32_t i;
|
u_int32_t i;
|
||||||
u_int64_t total_flow_bytes = 0;
|
|
||||||
u_int32_t avg_pkt_size = 0;
|
u_int32_t avg_pkt_size = 0;
|
||||||
int thread_id;
|
int thread_id;
|
||||||
char buf[32];
|
char buf[32];
|
||||||
@@ -3108,8 +3107,6 @@ static void printResults(u_int64_t processing_time_usec, u_int64_t setup_time_us
|
|||||||
(long long unsigned int)cumulative_stats.protocol_counter_bytes[i],
|
(long long unsigned int)cumulative_stats.protocol_counter_bytes[i],
|
||||||
cumulative_stats.protocol_flows[i]);
|
cumulative_stats.protocol_flows[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
total_flow_bytes += cumulative_stats.protocol_counter_bytes[i];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3125,8 +3122,6 @@ static void printResults(u_int64_t processing_time_usec, u_int64_t setup_time_us
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// printf("\n\nTotal Flow Traffic: %llu (diff: %llu)\n", total_flow_bytes, cumulative_stats.total_ip_bytes-total_flow_bytes);
|
|
||||||
|
|
||||||
printRiskStats();
|
printRiskStats();
|
||||||
printFlowsStats();
|
printFlowsStats();
|
||||||
|
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ void ndpi_int_stun_add_connection(struct ndpi_detection_module_struct *ndpi_stru
|
|||||||
|
|
||||||
#ifdef DEBUG_LRU
|
#ifdef DEBUG_LRU
|
||||||
printf("[LRU] ADDING %u / %u.%u [%u -> %u]\n", key, proto, app_proto,
|
printf("[LRU] ADDING %u / %u.%u [%u -> %u]\n", key, proto, app_proto,
|
||||||
ntohs(flow->packet.udp->source), ntohs(flow->packet.udp->dest));
|
ntohs(packet->udp->source), ntohs(packet->udp->dest));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ndpi_lru_add_to_cache(ndpi_struct->stun_cache, key, app_proto);
|
ndpi_lru_add_to_cache(ndpi_struct->stun_cache, key, app_proto);
|
||||||
|
|||||||
@@ -1098,7 +1098,7 @@ static void tlsCheckUncommonALPN(struct ndpi_detection_module_struct *ndpi_struc
|
|||||||
|
|
||||||
if(!is_a_common_alpn(ndpi_struct, alpn_start, alpn_len)) {
|
if(!is_a_common_alpn(ndpi_struct, alpn_start, alpn_len)) {
|
||||||
#ifdef DEBUG_TLS
|
#ifdef DEBUG_TLS
|
||||||
printf("TLS uncommon ALPN found: %.*s\n", (int)alpn_len, alpn);
|
printf("TLS uncommon ALPN found: %.*s\n", (int)alpn_len, alpn_start);
|
||||||
#endif
|
#endif
|
||||||
ndpi_set_risk(ndpi_struct, flow, NDPI_TLS_UNCOMMON_ALPN);
|
ndpi_set_risk(ndpi_struct, flow, NDPI_TLS_UNCOMMON_ALPN);
|
||||||
break;
|
break;
|
||||||
@@ -1604,9 +1604,9 @@ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct,
|
|||||||
/* Note that both Safari and Chrome can overlap */
|
/* Note that both Safari and Chrome can overlap */
|
||||||
#ifdef DEBUG_HEURISTIC
|
#ifdef DEBUG_HEURISTIC
|
||||||
printf("[CIPHERS] [is_chrome_tls: %u (%u)][is_safari_tls: %u (%u)][this_is_not_safari: %u]\n",
|
printf("[CIPHERS] [is_chrome_tls: %u (%u)][is_safari_tls: %u (%u)][this_is_not_safari: %u]\n",
|
||||||
flow->protos.tls_quic_stun.tls_quic.browser_euristics.is_chrome_tls,
|
flow->protos.tls_quic_stun.tls_quic.browser_heuristics.is_chrome_tls,
|
||||||
chrome_ciphers,
|
chrome_ciphers,
|
||||||
flow->protos.tls_quic_stun.tls_quic.browser_euristics.is_safari_tls,
|
flow->protos.tls_quic_stun.tls_quic.browser_heuristics.is_safari_tls,
|
||||||
safari_ciphers,
|
safari_ciphers,
|
||||||
this_is_not_safari);
|
this_is_not_safari);
|
||||||
#endif
|
#endif
|
||||||
@@ -1914,9 +1914,9 @@ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct,
|
|||||||
|
|
||||||
#ifdef DEBUG_HEURISTIC
|
#ifdef DEBUG_HEURISTIC
|
||||||
printf("[SIGNATURE] [is_firefox_tls: %u][is_chrome_tls: %u][is_safari_tls: %u][duplicate_found: %u]\n",
|
printf("[SIGNATURE] [is_firefox_tls: %u][is_chrome_tls: %u][is_safari_tls: %u][duplicate_found: %u]\n",
|
||||||
flow->protos.tls_quic_stun.tls_quic.browser_euristics.is_firefox_tls,
|
flow->protos.tls_quic_stun.tls_quic.browser_heuristics.is_firefox_tls,
|
||||||
flow->protos.tls_quic_stun.tls_quic.browser_euristics.is_chrome_tls,
|
flow->protos.tls_quic_stun.tls_quic.browser_heuristics.is_chrome_tls,
|
||||||
flow->protos.tls_quic_stun.tls_quic.browser_euristics.is_safari_tls,
|
flow->protos.tls_quic_stun.tls_quic.browser_heuristics.is_safari_tls,
|
||||||
duplicate_found);
|
duplicate_found);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user