aboutsummaryrefslogtreecommitdiff
path: root/src/lib/ndpi_main.c
diff options
context:
space:
mode:
authorIgor Duarte <igor.ribeiro.duarte@gmail.com>2020-10-27 04:45:09 -0300
committerGitHub <noreply@github.com>2020-10-27 08:45:09 +0100
commitba6a48c9fec64b0e3617f7f7f1f6afeedd8b6437 (patch)
tree68c123f94207df21f306fe3bbfc5bc95e5704582 /src/lib/ndpi_main.c
parent48d640583a58de62ed1a500e2e98b19a9ffce1ef (diff)
Improve skype detection (#1039)
* Add new skype pcap PCAP extracted from SkypeIRC.cap (available in https://wiki.wireshark.org/SampleCaptures?action=AttachFile&do=get&target=SkypeIRC.cap) * Improve skype detection
Diffstat (limited to 'src/lib/ndpi_main.c')
-rw-r--r--src/lib/ndpi_main.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index 65f1db852..ae5ed22f4 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -4607,17 +4607,15 @@ ndpi_protocol ndpi_detection_process_packet(struct ndpi_detection_module_struct
if(flow->server_id == NULL)
flow->server_id = dst; /* Default */
- if(flow->detected_protocol_stack[0] != NDPI_PROTOCOL_UNKNOWN) {
- if(flow->check_extra_packets) {
- ndpi_process_extra_packet(ndpi_str, flow, packet, packetlen, current_time_ms, src, dst);
- /* Update in case of new match */
- ret.master_protocol = flow->detected_protocol_stack[1],
- ret.app_protocol = flow->detected_protocol_stack[0],
- ret.category = flow->category;
- goto invalidate_ptr;
- } else
- goto ret_protocols;
- }
+ if(flow->check_extra_packets) {
+ ndpi_process_extra_packet(ndpi_str, flow, packet, packetlen, current_time_ms, src, dst);
+ /* Update in case of new match */
+ ret.master_protocol = flow->detected_protocol_stack[1],
+ ret.app_protocol = flow->detected_protocol_stack[0],
+ ret.category = flow->category;
+ goto invalidate_ptr;
+ } else if (flow->detected_protocol_stack[0] != NDPI_PROTOCOL_UNKNOWN)
+ goto ret_protocols;
/* need at least 20 bytes for ip header */
if(packetlen < 20) {
@@ -6538,6 +6536,11 @@ u_int8_t ndpi_extra_dissection_possible(struct ndpi_detection_module_struct *ndp
if(!flow->protos.telnet.password_detected)
return(1);
break;
+
+ case NDPI_PROTOCOL_SKYPE:
+ if (flow->extra_packets_func)
+ return(1);
+ break;
}
return(0);