Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaderi committed Nov 29, 2024
1 parent b1d1f8c commit 2a8c7bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/protocols/stun.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,12 +664,16 @@ static int keep_extra_dissection(struct ndpi_detection_module_struct *ndpi_struc
* classification doesn't change while in monitoring!
*/

if((packet->payload[0] != 0x0) && (packet->payload[0] != 0x1)) {
if(packet->udp
&& (ntohs(packet->udp->source) == 3478)
&& (packet->payload[0] != 0x0) && (packet->payload[0] != 0x1)) {
if(flow->stun.num_non_stun_pkt < 2) {
flow->stun.non_stun_pkt_len[flow->stun.num_non_stun_pkt++] = packet->payload_packet_len;

#ifdef STUN_DEBUG
if(flow->stun.num_non_stun_pkt == 2)
printf("%d %d\n", flow->stun.non_stun_pkt_len[0], flow->stun.non_stun_pkt_len[1]);
#endif
}
}

Expand Down

0 comments on commit 2a8c7bf

Please sign in to comment.