aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/sip.c
diff options
context:
space:
mode:
authorDamir Franusic <damir.franusic@gmail.com>2019-05-31 15:19:07 +0200
committerDamir Franusic <damir.franusic@gmail.com>2019-05-31 15:19:07 +0200
commit5c7e0a0319d97f8d0eb8c60bcfa5676dac6b90be (patch)
tree09f459de46ee85e7937c63c413178c44442af09f /src/lib/protocols/sip.c
parent1b9955e9ef7cda3c1aef997f6db502690da23433 (diff)
SIP Message extension
* RFC 3248
Diffstat (limited to 'src/lib/protocols/sip.c')
-rw-r--r--src/lib/protocols/sip.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/protocols/sip.c b/src/lib/protocols/sip.c
index 80fd175f0..2583dbfdf 100644
--- a/src/lib/protocols/sip.c
+++ b/src/lib/protocols/sip.c
@@ -136,6 +136,14 @@ void ndpi_search_sip_handshake(struct ndpi_detection_module_struct
ndpi_int_sip_add_connection(ndpi_struct, flow, 0);
return;
}
+
+ /* SIP message extension RFC 3248 */
+ if ((memcmp(packet_payload, "MESSAGE ", 8) == 0 || memcmp(packet_payload, "message ", 8) == 0)
+ && (memcmp(&packet_payload[8], "SIP:", 4) == 0 || memcmp(&packet_payload[8], "sip:", 4) == 0)) {
+ NDPI_LOG_INFO(ndpi_struct, "found sip MESSAGE\n");
+ ndpi_int_sip_add_connection(ndpi_struct, flow, 0);
+ return;
+ }
/* Courtesy of Miguel Quesada <mquesadab@gmail.com> */
if ((memcmp(packet_payload, "OPTIONS ", 8) == 0