aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/rtmp.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2020-01-08 22:01:45 +0100
committerLuca Deri <deri@ntop.org>2020-01-08 22:01:45 +0100
commit3ba7667887f2b9fb3754e15b9fb8fc25d6568475 (patch)
treeb3145aee95f9d9d6029ed0be9e4f33842d2ca8e0 /src/lib/protocols/rtmp.c
parentfd943d6000316cdab5588558090bce0b2242f2f3 (diff)
Various ethereum improvements
Diffstat (limited to 'src/lib/protocols/rtmp.c')
-rw-r--r--src/lib/protocols/rtmp.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/protocols/rtmp.c b/src/lib/protocols/rtmp.c
index 9bf73fecd..6f40ce42d 100644
--- a/src/lib/protocols/rtmp.c
+++ b/src/lib/protocols/rtmp.c
@@ -1,6 +1,7 @@
/*
* rtmp.c
*
+ * Copyright (C) 2020 - ntop.org
* Copyright (C) 2014 Tomasz Bujlow <tomasz@skatnet.dk>
*
* The signature is based on the Libprotoident library.
@@ -46,16 +47,16 @@ static void ndpi_check_rtmp(struct ndpi_detection_module_struct *ndpi_struct, st
}
/* Check if we so far detected the protocol in the request or not. */
- if (flow->rtmp_stage == 0) {
- NDPI_LOG_DBG2(ndpi_struct, "RTMP stage 0: \n");
+ if(flow->rtmp_stage == 0) {
+ NDPI_LOG_DBG2(ndpi_struct, "RTMP stage 0: \n");
- if ((payload_len >= 4) && ((packet->payload[0] == 0x03) || (packet->payload[0] == 0x06))) {
- NDPI_LOG_DBG2(ndpi_struct, "Possible RTMP request detected, we will look further for the response\n");
+ if ((payload_len >= 4) && ((packet->payload[0] == 0x03) || (packet->payload[0] == 0x06))) {
+ NDPI_LOG_DBG2(ndpi_struct, "Possible RTMP request detected, we will look further for the response\n");
- /* Encode the direction of the packet in the stage, so we will know when we need to look for the response packet. */
- flow->rtmp_stage = packet->packet_direction + 1;
- }
-
+ /* Encode the direction of the packet in the stage, so we will know when we need to look for the response packet. */
+ flow->rtmp_stage = packet->packet_direction + 1;
+ } else
+ NDPI_EXCLUDE_PROTO(ndpi_struct, flow);
} else {
NDPI_LOG_DBG2(ndpi_struct, "RTMP stage %u: \n", flow->rtmp_stage);
@@ -72,7 +73,6 @@ static void ndpi_check_rtmp(struct ndpi_detection_module_struct *ndpi_struct, st
NDPI_LOG_DBG2(ndpi_struct, "The reply did not seem to belong to RTMP, resetting the stage to 0\n");
flow->rtmp_stage = 0;
}
-
}
}