Fixes for API changes
This commit is contained in:
@@ -1006,6 +1006,7 @@ static void printFlow(u_int16_t id, struct ndpi_flow_info *flow, u_int16_t threa
|
|||||||
json_object *jObj;
|
json_object *jObj;
|
||||||
#endif
|
#endif
|
||||||
FILE *out = results_file ? results_file : stdout;
|
FILE *out = results_file ? results_file : stdout;
|
||||||
|
u_int8_t known_tls;
|
||||||
|
|
||||||
if(csv_fp != NULL) {
|
if(csv_fp != NULL) {
|
||||||
char buf[32];
|
char buf[32];
|
||||||
@@ -1049,7 +1050,7 @@ static void printFlow(u_int16_t id, struct ndpi_flow_info *flow, u_int16_t threa
|
|||||||
(flow->ssh_tls.server_info[0] != '\0') ? flow->ssh_tls.server_info : "");
|
(flow->ssh_tls.server_info[0] != '\0') ? flow->ssh_tls.server_info : "");
|
||||||
|
|
||||||
fprintf(csv_fp, "%s,%s,%s,",
|
fprintf(csv_fp, "%s,%s,%s,",
|
||||||
(flow->ssh_tls.ssl_version != 0) ? ndpi_ssl_version2str(flow->ssh_tls.ssl_version) : "",
|
(flow->ssh_tls.ssl_version != 0) ? ndpi_ssl_version2str(flow->ssh_tls.ssl_version, &known_tls) : "",
|
||||||
(flow->ssh_tls.ja3_client[0] != '\0') ? flow->ssh_tls.ja3_client : "",
|
(flow->ssh_tls.ja3_client[0] != '\0') ? flow->ssh_tls.ja3_client : "",
|
||||||
(flow->ssh_tls.ja3_client[0] != '\0') ? is_unsafe_cipher(flow->ssh_tls.client_unsafe_cipher) : "");
|
(flow->ssh_tls.ja3_client[0] != '\0') ? is_unsafe_cipher(flow->ssh_tls.client_unsafe_cipher) : "");
|
||||||
|
|
||||||
@@ -1146,7 +1147,7 @@ static void printFlow(u_int16_t id, struct ndpi_flow_info *flow, u_int16_t threa
|
|||||||
fprintf(out, "[URL: %s][StatusCode: %u]",
|
fprintf(out, "[URL: %s][StatusCode: %u]",
|
||||||
flow->http.url, flow->http.response_status_code);
|
flow->http.url, flow->http.response_status_code);
|
||||||
|
|
||||||
if(flow->ssh_tls.ssl_version != 0) fprintf(out, "[%s]", ndpi_ssl_version2str(flow->ssh_tls.ssl_version));
|
if(flow->ssh_tls.ssl_version != 0) fprintf(out, "[%s]", ndpi_ssl_version2str(flow->ssh_tls.ssl_version, &known_tls));
|
||||||
if(flow->ssh_tls.client_info[0] != '\0') fprintf(out, "[Client: %s]", flow->ssh_tls.client_info);
|
if(flow->ssh_tls.client_info[0] != '\0') fprintf(out, "[Client: %s]", flow->ssh_tls.client_info);
|
||||||
if(flow->ssh_tls.client_hassh[0] != '\0') fprintf(out, "[HASSH-C: %s]", flow->ssh_tls.client_hassh);
|
if(flow->ssh_tls.client_hassh[0] != '\0') fprintf(out, "[HASSH-C: %s]", flow->ssh_tls.client_hassh);
|
||||||
|
|
||||||
@@ -1310,8 +1311,12 @@ static void node_proto_guess_walker(const void *node, ndpi_VISIT which, int dept
|
|||||||
u_int16_t thread_id = *((u_int16_t *) user_data);
|
u_int16_t thread_id = *((u_int16_t *) user_data);
|
||||||
|
|
||||||
if((which == ndpi_preorder) || (which == ndpi_leaf)) { /* Avoid walking the same node multiple times */
|
if((which == ndpi_preorder) || (which == ndpi_leaf)) { /* Avoid walking the same node multiple times */
|
||||||
if((!flow->detection_completed) && flow->ndpi_flow)
|
if((!flow->detection_completed) && flow->ndpi_flow) {
|
||||||
flow->detected_protocol = ndpi_detection_giveup(ndpi_thread_info[0].workflow->ndpi_struct, flow->ndpi_flow, enable_protocol_guess);
|
u_int8_t proto_guessed;
|
||||||
|
|
||||||
|
flow->detected_protocol = ndpi_detection_giveup(ndpi_thread_info[0].workflow->ndpi_struct,
|
||||||
|
flow->ndpi_flow, enable_protocol_guess, &proto_guessed);
|
||||||
|
}
|
||||||
|
|
||||||
process_ndpi_collected_info(ndpi_thread_info[thread_id].workflow, flow);
|
process_ndpi_collected_info(ndpi_thread_info[thread_id].workflow, flow);
|
||||||
|
|
||||||
|
|||||||
@@ -1238,9 +1238,12 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow,
|
|||||||
if(ndpi_flow && ndpi_flow->check_extra_packets)
|
if(ndpi_flow && ndpi_flow->check_extra_packets)
|
||||||
flow->check_extra_packets = 1;
|
flow->check_extra_packets = 1;
|
||||||
|
|
||||||
if(flow->detected_protocol.app_protocol == NDPI_PROTOCOL_UNKNOWN)
|
if(flow->detected_protocol.app_protocol == NDPI_PROTOCOL_UNKNOWN) {
|
||||||
|
u_int8_t proto_guessed;
|
||||||
|
|
||||||
flow->detected_protocol = ndpi_detection_giveup(workflow->ndpi_struct, flow->ndpi_flow,
|
flow->detected_protocol = ndpi_detection_giveup(workflow->ndpi_struct, flow->ndpi_flow,
|
||||||
enable_protocol_guess);
|
enable_protocol_guess, &proto_guessed);
|
||||||
|
}
|
||||||
|
|
||||||
process_ndpi_collected_info(workflow, flow);
|
process_ndpi_collected_info(workflow, flow);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user