mirror of
https://github.com/coturn/coturn.git
synced 2026-04-03 11:21:00 +02:00
## Problem Since 4.7.0, `--stun-backward-compatibility` no longer works. Legacy STUN clients (RFC 3489, pre-magic-cookie) receive no response even when the option is explicitly enabled. ## Root Cause Commit 4cc076d renamed `no_stun_backward_compatibility` (negative logic) to `stun_backward_compatibility` (positive logic). Two call sites were not updated correctly: 1. **`src/server/ns_turn_server.c`**: the `old_stun_is_command_message_str` branch in the TCP/stream socket handler kept `!` on the renamed variable, inverting the condition. Old STUN was processed only when backward compat was *off*. 2. **`src/apps/relay/dtls_listener.c`**: the UDP/DTLS early packet validation block never included an `old_stun_is_command_message_str` check, so old STUN packets were always classified as invalid regardless of the backward compat flag. ## Fix - **`ns_turn_server.c`**: Remove the stray `!` negation restoring correct condition semantics. - **`dtls_listener.c`**: Add the missing old-STUN branch in the UDP packet validation block, guarded by `turn_params.stun_backward_compatibility`.