aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2019-08-26 19:13:45 +0200
committerLuca Deri <deri@ntop.org>2019-08-26 19:13:45 +0200
commitb837f3753d247b0653b22383eabe8525f684ab29 (patch)
treeb355e37673a1960032545b2522eca2caf417a978
parentd043cd2ac75f88ad22ae3370d227b489c684d9b2 (diff)
SSH hash fix
-rw-r--r--src/lib/protocols/ssh.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/protocols/ssh.c b/src/lib/protocols/ssh.c
index 4b2296411..de3b93bc2 100644
--- a/src/lib/protocols/ssh.c
+++ b/src/lib/protocols/ssh.c
@@ -250,7 +250,6 @@ void ndpi_search_ssh_tcp(struct ndpi_detection_module_struct *ndpi_struct, struc
#endif
NDPI_LOG_DBG2(ndpi_struct, "ssh stage 1 passed\n");
- flow->l4.tcp.ssh_stage++;;
flow->guessed_host_protocol_id = flow->guessed_protocol_id = NDPI_PROTOCOL_SSH;
} else {
NDPI_LOG_INFO(ndpi_struct, "found ssh\n");
@@ -261,6 +260,7 @@ void ndpi_search_ssh_tcp(struct ndpi_detection_module_struct *ndpi_struct, struc
printf("\n[SSH] [completed stage: %u]\n", flow->l4.tcp.ssh_stage);
#endif
+ flow->l4.tcp.ssh_stage = 3;
return;
}
} else {
@@ -327,6 +327,10 @@ void ndpi_search_ssh_tcp(struct ndpi_detection_module_struct *ndpi_struct, struc
return;
}
+#ifdef SSH_DEBUG
+ printf("\n[SSH] Excluding SSH");
+#endif
+
NDPI_LOG_DBG(ndpi_struct, "excluding ssh at stage %d\n", flow->l4.tcp.ssh_stage);
NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_SSH);
}