Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
network: only resolve interface name on ipv6 ll
It turns out that resolving interface name from sockaddr_in6->sin6_scope_id only works on link-local addresses. This resulted in errors when connecting to iiod over global ipv6. The man page on sin6_scope_id states that: "Linux supports it only for link-local addresses, in that case sin6_scope_id contains the interface index." The macro IN6_IS_ADDR_LINKLOCAL seems appropriate to test this. I have not been able to test this on WIN32, but I have found multiple pieces of win32 code using this macro, which all seem to pull it from <ws2tcpip.h> which is already included in network.c so I'm confident it will work. fixes analogdevicesinc#296 Signed-off-by: Jorik Jonker <[email protected]>
- Loading branch information