aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2023-05-16 16:02:14 +0200
committerGitHub <noreply@github.com>2023-05-16 16:02:14 +0200
commitace32c9dfefb2ea3130cfcdf086aacf22532c70c (patch)
tree84ac87b8958a49f65cab94e228831f2bfd67b497 /src
parent4e186f6bfbd734bf44124e6e0f710a3a0372c92c (diff)
Add support for SRTP (#1977)
The goal is to have Zoom flows classified as "Encrypted" and not as "Cleartext". Start documenting the list of protocols supported by nDPI; format, verbosity and content are still a work-in-progress.
Diffstat (limited to 'src')
-rw-r--r--src/include/ndpi_protocol_ids.h1
-rw-r--r--src/lib/ndpi_main.c4
-rw-r--r--src/lib/protocols/rtp.c2
3 files changed, 6 insertions, 1 deletions
diff --git a/src/include/ndpi_protocol_ids.h b/src/include/ndpi_protocol_ids.h
index c130fb81a..08ddfc4fa 100644
--- a/src/include/ndpi_protocol_ids.h
+++ b/src/include/ndpi_protocol_ids.h
@@ -366,6 +366,7 @@ typedef enum {
NDPI_PROTOCOL_OICQ = 335,
NDPI_PROTOCOL_HOTS = 336, /* Heroes of the Storm */
NDPI_PROTOCOL_FACEBOOK_REEL_STORY = 337,
+ NDPI_PROTOCOL_SRTP = 338,
#ifdef CUSTOM_NDPI_PROTOCOLS
#include "../../../nDPI-custom/custom_ndpi_protocol_ids.h"
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index c4d8ce886..882b0f0da 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -2074,6 +2074,10 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp
"Heroes_of_the_Storm", NDPI_PROTOCOL_CATEGORY_GAME,
ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
+ ndpi_set_proto_defaults(ndpi_str, 0 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_ACCEPTABLE, NDPI_PROTOCOL_SRTP,
+ "SRTP", NDPI_PROTOCOL_CATEGORY_MEDIA,
+ ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
+ ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
#ifdef CUSTOM_NDPI_PROTOCOLS
diff --git a/src/lib/protocols/rtp.c b/src/lib/protocols/rtp.c
index 218895679..a0d6352f7 100644
--- a/src/lib/protocols/rtp.c
+++ b/src/lib/protocols/rtp.c
@@ -212,7 +212,7 @@ static void ndpi_rtp_search(struct ndpi_detection_module_struct *ndpi_struct,
ndpi_set_detected_protocol(ndpi_struct, flow,
NDPI_PROTOCOL_ZOOM,
- NDPI_PROTOCOL_RTP,
+ NDPI_PROTOCOL_SRTP,
NDPI_CONFIDENCE_DPI);
return;
}