aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2025-04-17 14:16:02 +0200
committerGitHub <noreply@github.com>2025-04-17 14:16:02 +0200
commit2e7b75a0e579063820e84bf0ba41bdcd542c6aba (patch)
tree5d329584d6d4ffd69c6232643059931d2c2fb309 /src/lib/protocols
parent9283ebc1c93b182699d947d05c6a8f93865e0bb9 (diff)
STUN/RTP: extend extracted metadata (#2798)
Diffstat (limited to 'src/lib/protocols')
-rw-r--r--src/lib/protocols/stun.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/protocols/stun.c b/src/lib/protocols/stun.c
index 6b7e78317..640285bcd 100644
--- a/src/lib/protocols/stun.c
+++ b/src/lib/protocols/stun.c
@@ -973,6 +973,13 @@ static int stun_search_again(struct ndpi_detection_module_struct *ndpi_struct,
/* TODO: store RTP information in 'struct rtp_info' */
NDPI_LOG_INFO(ndpi_struct, "Found RTP over STUN\n");
+ if(flow->stun.t_start != 0) {
+ flow->stun.t_end = ndpi_get_current_time(flow);
+ } else if(flow->stun.rtp_counters[0] != 0 && flow->stun.rtp_counters[1] != 0) {
+ flow->stun.t_start = ndpi_get_current_time(flow);
+ flow->stun.t_end = ndpi_get_current_time(flow);
+ }
+
rtp_get_stream_type(packet->payload[1] & 0x7F, &flow->flow_multimedia_types, flow->detected_protocol_stack[0]);
if(flow->detected_protocol_stack[0] != NDPI_PROTOCOL_RTP &&