Skip to content

Commit

Permalink
RTP: fix identification over TCP
Browse files Browse the repository at this point in the history
We can access `flow->l4.udp` structure only with UDP flows...
  • Loading branch information
IvanNardi committed Sep 10, 2024
1 parent bc94722 commit def86ba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib/protocols/rtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,11 @@ static void ndpi_rtp_search(struct ndpi_detection_module_struct *ndpi_struct,

if(is_rtp == IS_RTP) {
if(flow->rtp_stage == 2) {
if(flow->l4.udp.line_pkts[0] >= 2 && flow->l4.udp.line_pkts[1] >= 2) {
if(flow->l4_proto == IPPROTO_UDP &&
flow->l4.udp.line_pkts[0] >= 2 && flow->l4.udp.line_pkts[1] >= 2) {
/* It seems that it is a LINE stuff; let its dissector to evaluate */
} else if(flow->l4.udp.epicgames_stage > 0) {
} else if(flow->l4_proto == IPPROTO_UDP &&
flow->l4.udp.epicgames_stage > 0) {
/* It seems that it is a EpicGames stuff; let its dissector to evaluate */
} else if(flow->rtp_seq_set[packet->packet_direction] &&
flow->rtp_seq[packet->packet_direction] == seq) {
Expand Down

0 comments on commit def86ba

Please sign in to comment.