Skip to content

[core] Use switch_stun_ipv6_t for STUN IPv6 write paths.#3037

Merged
andywolk merged 2 commits into
masterfrom
dmitry/fix_stun_ipv6
May 26, 2026
Merged

[core] Use switch_stun_ipv6_t for STUN IPv6 write paths.#3037
andywolk merged 2 commits into
masterfrom
dmitry/fix_stun_ipv6

Conversation

@morbit85
Copy link
Copy Markdown
Collaborator

@morbit85 morbit85 commented May 26, 2026

Route IPv6 writes in switch_stun_packet_attribute_add_binded_address and switch_stun_packet_attribute_add_xor_binded_address through switch_stun_ipv6_t (16-byte address[]) instead of switch_stun_ip_t (4-byte uint32_t address).

Add IPv4/IPv6 unit tests for both encoders.

Reported by: Adam Bedard @CaffinatedSquirrel-OG, Security Researcher.

Route IPv6 writes in `switch_stun_packet_attribute_add_binded_address`
and `switch_stun_packet_attribute_add_xor_binded_address` through
`switch_stun_ipv6_t` (16-byte `address[]`) instead of `switch_stun_ip_t`
(4-byte `uint32_t address`).

Add IPv4/IPv6 unit tests for both encoders.
@morbit85 morbit85 requested a review from andywolk May 26, 2026 14:27
@morbit85 morbit85 added the bug Something isn't working label May 26, 2026
@andywolk andywolk merged commit bf9c95e into master May 26, 2026
20 checks passed
@andywolk andywolk deleted the dmitry/fix_stun_ipv6 branch May 26, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants