Skip to content

Commit def86ba

Browse files
committed
RTP: fix identification over TCP
We can access `flow->l4.udp` structure only with UDP flows...
1 parent bc94722 commit def86ba

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/lib/protocols/rtp.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,11 @@ static void ndpi_rtp_search(struct ndpi_detection_module_struct *ndpi_struct,
186186

187187
if(is_rtp == IS_RTP) {
188188
if(flow->rtp_stage == 2) {
189-
if(flow->l4.udp.line_pkts[0] >= 2 && flow->l4.udp.line_pkts[1] >= 2) {
189+
if(flow->l4_proto == IPPROTO_UDP &&
190+
flow->l4.udp.line_pkts[0] >= 2 && flow->l4.udp.line_pkts[1] >= 2) {
190191
/* It seems that it is a LINE stuff; let its dissector to evaluate */
191-
} else if(flow->l4.udp.epicgames_stage > 0) {
192+
} else if(flow->l4_proto == IPPROTO_UDP &&
193+
flow->l4.udp.epicgames_stage > 0) {
192194
/* It seems that it is a EpicGames stuff; let its dissector to evaluate */
193195
} else if(flow->rtp_seq_set[packet->packet_direction] &&
194196
flow->rtp_seq[packet->packet_direction] == seq) {

0 commit comments

Comments
 (0)