Commit 9a622300 authored by Committed by Olivier Crête
agent: Use getnameinfo() instead of inet_ntop() to stringify addresses
inet_ntop() drops IPv6 link-local scope IDs on the floor, which means libnice doesn’t generate any IPv6 candidates for link-local connections, meaning that it will theoretically fail to negotiate a connection on an IPv6-only network where the two peers are local. Fix that by using getnameinfo() to convert sockaddrs to strings, which preserves the scope ID. There are no portability concerns — getnameinfo() is POSIX.1-2001, and isn’t used on Windows (although it is supported, surprisingly).
Showing with 17 additions and 23 deletions