Bug fix. Protocol SIP: command 'CANCEL sip:' is not recognized.

Add sip.pcap for tests ( Source: https://wiki.wireshark.org/SIP ).
This commit is contained in:
Vitaly Lavrov 2017-10-31 22:04:14 +03:00
parent 4f72b954da
commit a0980228ef
3 changed files with 9 additions and 1 deletions

View file

@ -121,7 +121,7 @@ void ndpi_search_sip_handshake(struct ndpi_detection_module_struct
}
if ((memcmp(packet_payload, "CANCEL ", 7) == 0 || memcmp(packet_payload, "cancel ", 7) == 0)
&& (memcmp(&packet_payload[4], "SIP:", 4) == 0 || memcmp(&packet_payload[4], "sip:", 4) == 0)) {
&& (memcmp(&packet_payload[7], "SIP:", 4) == 0 || memcmp(&packet_payload[7], "sip:", 4) == 0)) {
NDPI_LOG(NDPI_PROTOCOL_SIP, ndpi_struct, NDPI_LOG_DEBUG, "found sip CANCEL.\n");
ndpi_int_sip_add_connection(ndpi_struct, flow, 0);
return;