aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/skype.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2024-01-29 12:27:15 +0100
committerLuca Deri <deri@ntop.org>2024-01-29 12:27:52 +0100
commit426494b4ba07b72faa32f6657f58677ae65fdc16 (patch)
tree260100fb0d0e924659e20b2aa61d3228df6afba1 /src/lib/protocols/skype.c
parent14cfa174be11e18c7d5f053dc99eeda6a66eb585 (diff)
Fixes invalid skype detection on UDP
Diffstat (limited to 'src/lib/protocols/skype.c')
-rw-r--r--src/lib/protocols/skype.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/protocols/skype.c b/src/lib/protocols/skype.c
index 5a506757f..36548d067 100644
--- a/src/lib/protocols/skype.c
+++ b/src/lib/protocols/skype.c
@@ -72,7 +72,10 @@ static void ndpi_check_skype(struct ndpi_detection_module_struct *ndpi_struct, s
if(is_port(sport, dport, 8801)) {
NDPI_LOG_INFO(ndpi_struct, "found ZOOM (in SKYPE_TEAMS code)\n");
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_ZOOM, NDPI_PROTOCOL_UNKNOWN, NDPI_CONFIDENCE_DPI);
- } else if (payload_len >= 16 && packet->payload[0] != 0x01) /* Avoid invalid Cisco HSRP detection / RADIUS */ {
+ } else if((payload_len >= 16)
+ && (packet->payload[0] != 0x01) /* Avoid invalid Cisco HSRP detection / RADIUS */
+ && (sport != dport) /* Avoid matching simple OT protocols such as CIP that have src and dst port alike */
+ ) {
NDPI_LOG_INFO(ndpi_struct, "found SKYPE_TEAMS\n");
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_SKYPE_TEAMS_CALL, NDPI_PROTOCOL_SKYPE_TEAMS, NDPI_CONFIDENCE_DPI);
}