diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2023-12-14 08:07:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-14 08:07:04 +0100 |
commit | 8ea16ffd77d486cce4c4bb0d58d80b32d68a4f4f (patch) | |
tree | 03a88cd0a4ff030ff2c5f59190955ebbd416df72 /src | |
parent | ef62391dba4814ab840539406f276685ba8535f1 (diff) |
TLS: be sure to always set a category value (#2206)
We probably need to check everywhere we set the category in the
"extra dissection" data path: a flow with a proper classification can't
have NDPI_PROTOCOL_CATEGORY_UNSPECIFIED as category.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/protocols/tls.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/protocols/tls.c b/src/lib/protocols/tls.c index 2fe8a7b96..5cb24a358 100644 --- a/src/lib/protocols/tls.c +++ b/src/lib/protocols/tls.c @@ -1329,6 +1329,10 @@ static int ndpi_search_tls_udp(struct ndpi_detection_module_struct *ndpi_struct, processed += block_len + 13; /* DTLS mid session: no need to further inspect the flow */ ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_DTLS, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI); + + ndpi_protocol ret = { __get_master(ndpi_struct, flow), NDPI_PROTOCOL_UNKNOWN, NDPI_PROTOCOL_UNKNOWN /* unused */, NDPI_PROTOCOL_CATEGORY_UNSPECIFIED, NULL}; + flow->category = ndpi_get_proto_category(ndpi_struct, ret); + flow->tls_quic.certificate_processed = 1; /* Fake, to avoid extra dissection */ break; } |