aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2023-06-21 14:25:34 +0200
committerGitHub <noreply@github.com>2023-06-21 14:25:34 +0200
commitcc582052b384f7e7e40dc1193683fcb353864d16 (patch)
treed0e1e9f456fd237185101bc55625e114834e33ee /src/lib/protocols
parent570c75d6019872610b0cbde981e25edcda5f6754 (diff)
Gnutella: improve detection (#2019)
Diffstat (limited to 'src/lib/protocols')
-rw-r--r--src/lib/protocols/gnutella.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/protocols/gnutella.c b/src/lib/protocols/gnutella.c
index 09190b53b..65415fcbb 100644
--- a/src/lib/protocols/gnutella.c
+++ b/src/lib/protocols/gnutella.c
@@ -271,6 +271,11 @@ static void ndpi_search_gnutella(struct ndpi_detection_module_struct *ndpi_struc
return;
}
}
+ if (packet->payload_packet_len >= 4 && memcmp(packet->payload, "GND\x10", 4) == 0) {
+ NDPI_LOG_DBG2(ndpi_struct, "detected gnutella udp, GND (2)\n");
+ ndpi_int_gnutella_add_connection(ndpi_struct, flow, NDPI_CONFIDENCE_DPI);
+ return;
+ }
if ((packet->payload_packet_len == 32)
&& memcmp(&packet->payload[16], "\x31\x01\x00\x09\x00\x00\x00", 7) == 0) {