aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2024-11-29 18:16:55 +0100
committerLuca Deri <deri@ntop.org>2024-11-29 18:16:55 +0100
commit2a8c7bfa98f07fbe6ed03aaf28221ef6c54ebf3e (patch)
tree49cbf2708dd63fb6de97e078f41eb9737a175b31 /src/lib
parentb1d1f8cfe09f6ae9525e047dd54bc043a7e83520 (diff)
Minor fix
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/protocols/stun.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/protocols/stun.c b/src/lib/protocols/stun.c
index 369e34068..3747d76d0 100644
--- a/src/lib/protocols/stun.c
+++ b/src/lib/protocols/stun.c
@@ -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
}
}