aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/ndpi_typedefs.h4
-rw-r--r--src/lib/ndpi_utils.c10
-rw-r--r--src/lib/third_party/src/hll/hll.c20
3 files changed, 27 insertions, 7 deletions
diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h
index affb29826..5f980b506 100644
--- a/src/include/ndpi_typedefs.h
+++ b/src/include/ndpi_typedefs.h
@@ -76,8 +76,8 @@ typedef enum {
NDPI_TLS_NOT_CARRYING_HTTPS,
NDPI_SUSPICIOUS_DGA_DOMAIN,
NDPI_MALFORMED_PACKET,
- NDPI_SSH_OBSOLETE_CLIENT_SIGNATURE,
- NDPI_SSH_OBSOLETE_SERVER_SIGNATURE,
+ NDPI_SSH_OBSOLETE_CLIENT_VERSION_OR_CIPHER,
+ NDPI_SSH_OBSOLETE_SERVER_VERSION_OR_CIPHER,
/* Leave this as last member */
NDPI_MAX_RISK
diff --git a/src/lib/ndpi_utils.c b/src/lib/ndpi_utils.c
index ee3d7bc71..ac2c7173c 100644
--- a/src/lib/ndpi_utils.c
+++ b/src/lib/ndpi_utils.c
@@ -1524,12 +1524,12 @@ const char* ndpi_risk2str(ndpi_risk_enum risk) {
case NDPI_MALFORMED_PACKET:
return("Malformed packet");
- case NDPI_SSH_OBSOLETE_CLIENT_SIGNATURE:
- return("SSH Obsolete Client Signature");
-
- case NDPI_SSH_OBSOLETE_SERVER_SIGNATURE:
- return("SSH Obsolete Server Signature");
+ case NDPI_SSH_OBSOLETE_CLIENT_VERSION_OR_CIPHER:
+ return("SSH obsolete client version/cipher");
+ case NDPI_SSH_OBSOLETE_SERVER_VERSION_OR_CIPHER:
+ return("SSH obsolete server version/cipher");
+
default:
snprintf(buf, sizeof(buf), "%d", (int)risk);
return(buf);
diff --git a/src/lib/third_party/src/hll/hll.c b/src/lib/third_party/src/hll/hll.c
index f8cd817db..b9d61f21c 100644
--- a/src/lib/third_party/src/hll/hll.c
+++ b/src/lib/third_party/src/hll/hll.c
@@ -47,6 +47,26 @@ static __inline u_int8_t _hll_rank(u_int32_t hash, u_int8_t bits) {
return i;
}
+/*
+ IMPORTANT: memory usage notes
+
+ [i: 4] 16 bytes
+ [i: 5] 32 bytes
+ [i: 6] 64 bytes
+ [i: 7] 128 bytes
+ [i: 8] 256 bytes
+ [i: 9] 512 bytes
+ [i: 10] 1024 bytes
+ [i: 11] 2048 bytes
+ [i: 12] 4096 bytes
+ [i: 13] 8192 bytes
+ [i: 14] 16384 bytes
+ [i: 15] 32768 bytes
+ [i: 16] 65536 bytes
+ [i: 17] 131072 bytes
+ [i: 18] 262144 bytes
+ [i: 19] 524288 bytes
+*/
int hll_init(struct ndpi_hll *hll, u_int8_t bits) {
if(bits < 4 || bits > 20) {
errno = ERANGE;