From 2e7b75a0e579063820e84bf0ba41bdcd542c6aba Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Thu, 17 Apr 2025 14:16:02 +0200 Subject: STUN/RTP: extend extracted metadata (#2798) --- src/lib/protocols/stun.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/lib/protocols') 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 && -- cgit v1.2.3