From 8c7071e040865b3b70b98ff8d8ad18c41f3fb74c Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Sat, 10 Dec 2022 18:32:25 +0100 Subject: DTLS: handle (certificate) fragments (#1811) Keep using the existing function to handle reassembling buffer: rename it from `ndpi_search_tls_tcp_memory` to `ndpi_search_tls_memory` and make it "transport" agnostic --- src/lib/ndpi_main.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/lib/ndpi_main.c') diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 7880aeae3..a3c017930 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -5092,12 +5092,10 @@ void ndpi_free_flow_data(struct ndpi_flow_struct* flow) { ndpi_free(flow->protos.tls_quic.encrypted_sni.esni); } - if(flow->l4_proto == IPPROTO_TCP) { - if(flow->l4.tcp.tls.message[0].buffer) - ndpi_free(flow->l4.tcp.tls.message[0].buffer); - if(flow->l4.tcp.tls.message[1].buffer) - ndpi_free(flow->l4.tcp.tls.message[1].buffer); - } + if(flow->tls_quic.message[0].buffer) + ndpi_free(flow->tls_quic.message[0].buffer); + if(flow->tls_quic.message[1].buffer) + ndpi_free(flow->tls_quic.message[1].buffer); if(flow->l4_proto == IPPROTO_UDP) { if(flow->l4.udp.quic_reasm_buf) -- cgit v1.2.3