aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ndpi_main.c6
-rw-r--r--src/lib/ndpi_utils.c2
-rw-r--r--src/lib/protocols/quic.c4
-rw-r--r--src/lib/protocols/tls.c12
4 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index 332c35457..7ae8861ac 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -4834,13 +4834,13 @@ ndpi_protocol ndpi_detection_giveup(struct ndpi_detection_module_struct *ndpi_st
*protocol_was_guessed = 1;
ndpi_set_detected_protocol(ndpi_str, flow, flow->guessed_protocol_id, NDPI_PROTOCOL_UNKNOWN);
}
- else if((flow->l4.tcp.tls.hello_processed == 1) &&
+ else if((flow->protos.tls_quic_stun.tls_quic.hello_processed == 1) &&
(flow->protos.tls_quic_stun.tls_quic.client_requested_server_name[0] != '\0')) {
*protocol_was_guessed = 1;
ndpi_set_detected_protocol(ndpi_str, flow, NDPI_PROTOCOL_TLS, NDPI_PROTOCOL_UNKNOWN);
} else if(enable_guess) {
if((flow->guessed_protocol_id == NDPI_PROTOCOL_UNKNOWN) && (flow->packet.l4_protocol == IPPROTO_TCP) &&
- flow->l4.tcp.tls.hello_processed)
+ flow->protos.tls_quic_stun.tls_quic.hello_processed)
flow->guessed_protocol_id = NDPI_PROTOCOL_TLS;
guessed_protocol_id = flow->guessed_protocol_id, guessed_host_protocol_id = flow->guessed_host_protocol_id;
@@ -5138,7 +5138,7 @@ void ndpi_fill_protocol_category(struct ndpi_detection_module_struct *ndpi_str,
}
}
- if(flow->l4.tcp.tls.hello_processed == 1 &&
+ if(flow->protos.tls_quic_stun.tls_quic.hello_processed == 1 &&
flow->protos.tls_quic_stun.tls_quic.client_requested_server_name[0] != '\0') {
u_int32_t id;
int rc = ndpi_match_custom_category(ndpi_str, (char *) flow->protos.tls_quic_stun.tls_quic.client_requested_server_name,
diff --git a/src/lib/ndpi_utils.c b/src/lib/ndpi_utils.c
index a7ba2818e..b1d1fcdb0 100644
--- a/src/lib/ndpi_utils.c
+++ b/src/lib/ndpi_utils.c
@@ -856,7 +856,7 @@ static const char* ndpi_get_flow_info_by_proto_id(struct ndpi_flow_struct const
return (char const *)flow->host_server_name;
case NDPI_PROTOCOL_QUIC:
case NDPI_PROTOCOL_TLS:
- if (flow->l4.tcp.tls.hello_processed != 0)
+ if (flow->protos.tls_quic_stun.tls_quic.hello_processed != 0)
{
return flow->protos.tls_quic_stun.tls_quic.client_requested_server_name;
}
diff --git a/src/lib/protocols/quic.c b/src/lib/protocols/quic.c
index a508c30ef..6790e6bb8 100644
--- a/src/lib/protocols/quic.c
+++ b/src/lib/protocols/quic.c
@@ -1297,7 +1297,7 @@ static void process_tls(struct ndpi_detection_module_struct *ndpi_struct,
packet->payload_packet_len = crypto_data_len;
processClientServerHello(ndpi_struct, flow, version);
- flow->l4.tcp.tls.hello_processed = 1; /* Allow matching of custom categories */
+ flow->protos.tls_quic_stun.tls_quic.hello_processed = 1; /* Allow matching of custom categories */
/* Restore */
packet->payload = p;
@@ -1368,7 +1368,7 @@ static void process_chlo(struct ndpi_detection_module_struct *ndpi_struct,
(char *)flow->protos.tls_quic_stun.tls_quic.client_requested_server_name,
strlen((const char*)flow->protos.tls_quic_stun.tls_quic.client_requested_server_name),
&ret_match, NDPI_PROTOCOL_QUIC);
- flow->l4.tcp.tls.hello_processed = 1; /* Allow matching of custom categories */
+ flow->protos.tls_quic_stun.tls_quic.hello_processed = 1; /* Allow matching of custom categories */
ndpi_check_dga_name(ndpi_struct, flow,
flow->protos.tls_quic_stun.tls_quic.client_requested_server_name, 1);
diff --git a/src/lib/protocols/tls.c b/src/lib/protocols/tls.c
index 9191272c2..90d816c4a 100644
--- a/src/lib/protocols/tls.c
+++ b/src/lib/protocols/tls.c
@@ -558,9 +558,9 @@ static void processCertificateElements(struct ndpi_detection_module_struct *ndpi
}
}
- if(!flow->l4.tcp.tls.subprotocol_detected)
+ if(!flow->protos.tls_quic_stun.tls_quic.subprotocol_detected)
if(ndpi_match_hostname_protocol(ndpi_struct, flow, NDPI_PROTOCOL_TLS, dNSName, len))
- flow->l4.tcp.tls.subprotocol_detected = 1;
+ flow->protos.tls_quic_stun.tls_quic.subprotocol_detected = 1;
i += len;
} else {
@@ -764,7 +764,7 @@ static int processTLSBlock(struct ndpi_detection_module_struct *ndpi_struct,
case 0x01: /* Client Hello */
case 0x02: /* Server Hello */
processClientServerHello(ndpi_struct, flow, 0);
- flow->l4.tcp.tls.hello_processed = 1;
+ flow->protos.tls_quic_stun.tls_quic.hello_processed = 1;
ndpi_int_tls_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_TLS);
#ifdef DEBUG_TLS
@@ -784,7 +784,7 @@ static int processTLSBlock(struct ndpi_detection_module_struct *ndpi_struct,
case 0x0b: /* Certificate */
/* Important: populate the tls union fields only after
* ndpi_int_tls_add_connection has been called */
- if(flow->l4.tcp.tls.hello_processed) {
+ if(flow->protos.tls_quic_stun.tls_quic.hello_processed) {
ret = processCertificate(ndpi_struct, flow);
if (ret != 1) {
#ifdef DEBUG_TLS
@@ -1694,10 +1694,10 @@ int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct,
if(!is_quic) {
if(ndpi_match_hostname_protocol(ndpi_struct, flow, NDPI_PROTOCOL_TLS, buffer, strlen(buffer)))
- flow->l4.tcp.tls.subprotocol_detected = 1;
+ flow->protos.tls_quic_stun.tls_quic.subprotocol_detected = 1;
} else {
if(ndpi_match_hostname_protocol(ndpi_struct, flow, NDPI_PROTOCOL_QUIC, buffer, strlen(buffer)))
- flow->l4.tcp.tls.subprotocol_detected = 1;
+ flow->protos.tls_quic_stun.tls_quic.subprotocol_detected = 1;
}
if(ndpi_check_dga_name(ndpi_struct, flow,