aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/quic.c
diff options
context:
space:
mode:
authorSimone Mainardi <simonemainardi@gmail.com>2016-07-08 15:10:33 +0200
committerSimone Mainardi <simonemainardi@gmail.com>2016-07-08 15:23:45 +0200
commit72e3930e088c9e6df51f7f314935167c63b8d0ad (patch)
treec94af77134d6de80ad01a0fcc5f988ace24c4392 /src/lib/protocols/quic.c
parent6fb81f146e2542cfbf7fab7d53678339c7747b35 (diff)
parent31140c8da74aaceb76709c11082e4cb2e07e11e9 (diff)
Fixes nDPI protocol initialization for Git
[NDPI] ndpi_init_protocol_defaults(missing protoId=226) INTERNAL ERROR: not all protocols have been initialized This is actually a merge of branch 'dev' into 1.8-stable.
Diffstat (limited to 'src/lib/protocols/quic.c')
-rw-r--r--src/lib/protocols/quic.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/lib/protocols/quic.c b/src/lib/protocols/quic.c
index ac443951b..6e1ad77cc 100644
--- a/src/lib/protocols/quic.c
+++ b/src/lib/protocols/quic.c
@@ -22,7 +22,6 @@
*
*/
-
#include "ndpi_api.h"
#ifdef NDPI_PROTOCOL_QUIC
@@ -38,18 +37,6 @@ static int quic_ports(u_int16_t sport, u_int16_t dport)
/* ***************************************************************** */
-static int quic_payload(const u_int8_t *payload) {
- if((payload[0] == 'Q')
- && isdigit(payload[1])
- && isdigit(payload[2])
- && isdigit(payload[3]))
- return(1);
-
- return(0);
-}
-
-/* ***************************************************************** */
-
static int quic_len(u_int8_t l) {
switch(l) {
case 0:
@@ -119,6 +106,12 @@ void ndpi_search_quic(struct ndpi_detection_module_struct *ndpi_struct,
flow->host_server_name[j++] = packet->payload[sni_offset];
sni_offset++, len--;
}
+
+ ndpi_match_host_subprotocol(ndpi_struct, flow,
+ (char *)flow->host_server_name,
+ strlen((const char*)flow->host_server_name),
+ NDPI_PROTOCOL_QUIC);
+
}
break;