Skip to content

Commit

Permalink
SSH hash fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaderi committed Aug 26, 2019
1 parent d043cd2 commit b837f37
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/protocols/ssh.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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 {
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit b837f37

Please sign in to comment.