aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2015-11-18 10:46:58 +0100
committerLuca Deri <deri@ntop.org>2015-11-18 10:46:58 +0100
commit169c837613d256acdfa07609d21625936bd331bf (patch)
treeb2b6bc62e7039e6e9712f130ed5bee979318dd52 /src/lib/protocols
parent33f38dd4378584e59f02429f5ccce79e87d69771 (diff)
Fix for https://github.com/ntop/nProbe/issues/7 for wrong RTP identification
Diffstat (limited to 'src/lib/protocols')
-rw-r--r--src/lib/protocols/rtp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/protocols/rtp.c b/src/lib/protocols/rtp.c
index 66630c192..17744ed95 100644
--- a/src/lib/protocols/rtp.c
+++ b/src/lib/protocols/rtp.c
@@ -37,6 +37,7 @@ static u_int8_t isValidMSRTPType(u_int8_t payloadType) {
case 8: /* G.711 A-Law */
case 9: /* G.722 */
case 13: /* Comfort Noise */
+ case 96: /* Dynamic RTP */
case 97: /* Redundant Audio Data Payload */
case 101: /* DTMF */
case 103: /* SILK Narrowband */
@@ -78,7 +79,7 @@ static void ndpi_rtp_search(struct ndpi_detection_module_struct *ndpi_struct,
/* Check whether this is an RTP flow */
if((payload_len >= 12)
- && ((payload[0] & 0xFF) == 0x80) /* RTP magic byte[1] */
+ && (((payload[0] & 0xFF) == 0x80) || ((payload[0] & 0xFF) == 0xA0)) /* RTP magic byte[1] */
&& ((payload_type < 72) || (payload_type > 76))
&& ((payload_type <= 34)
|| ((payload_type >= 96) && (payload_type <= 127))
@@ -90,7 +91,7 @@ static void ndpi_rtp_search(struct ndpi_detection_module_struct *ndpi_struct,
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_RTP, NDPI_PROTOCOL_UNKNOWN);
return;
} else if((payload_len >= 12)
- && ((payload[0] & 0xFF) == 0x80) /* RTP magic byte[1] */
+ && (((payload[0] & 0xFF) == 0x80) || ((payload[0] & 0xFF) == 0xA0)) /* RTP magic byte[1] */
&& (payloadType = isValidMSRTPType(payload[1] & 0xFF))) {
if(payloadType == 1 /* RTP */) {
NDPI_LOG(NDPI_PROTOCOL_RTP, ndpi_struct, NDPI_LOG_DEBUG, "Found MS Lync\n");