aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/http.c
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2025-05-20 15:48:56 +0200
committerGitHub <noreply@github.com>2025-05-20 15:48:56 +0200
commit0d2213f7ff154af85d8deaaaaa6537e09676574f (patch)
treee99d5c38bb86de79cc1b83c5183389c02cf0d3e5 /src/lib/protocols/http.c
parent6512c18acf528695a54b6c4dd9aed12c7cbef0a7 (diff)
Gnutella: simplify code, to support only gtk-gnutella client (#2830)
Close #2818
Diffstat (limited to 'src/lib/protocols/http.c')
-rw-r--r--src/lib/protocols/http.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c
index c9dbd36fe..2fc9331d3 100644
--- a/src/lib/protocols/http.c
+++ b/src/lib/protocols/http.c
@@ -651,6 +651,11 @@ static void ndpi_http_parse_subprotocol(struct ndpi_detection_module_struct *ndp
ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_UBNTAC2, master_protocol, NDPI_CONFIDENCE_DPI);
}
+ if ((flow->detected_protocol_stack[1] == NDPI_PROTOCOL_UNKNOWN) &&
+ flow->http.user_agent && strstr(flow->http.user_agent, "gtk-gnutella")) {
+ ndpi_set_detected_protocol(ndpi_struct, flow, NDPI_PROTOCOL_GNUTELLA, master_protocol, NDPI_CONFIDENCE_DPI);
+ }
+
if(flow->http.request_header_observed) {
if(flow->http.first_payload_after_header_observed == 0) {
/* Skip the last part of the HTTP request */