Commit 10549c91 authored by Ghislain MARY's avatar Ghislain MARY

Fix encoding of IPv6 STUN address.

parent 71445c80
......@@ -150,7 +150,11 @@ static void encode_message_header(StunMessageEncoder *encoder, uint16_t type, ui
static void encode_addr(StunMessageEncoder *encoder, uint16_t type, const MSStunAddress *addr) {
encode16(encoder, type);
if (addr->family == MS_STUN_ADDR_FAMILY_IPV6) {
encode16(encoder, 20);
} else {
encode16(encoder, 8);
encode8(encoder, 0);
encode8(encoder, addr->family);
if (addr->family == MS_STUN_ADDR_FAMILY_IPV6) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment