Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dns_sd_windows: Fix discovery on IPv6 once again
The getnameinfo() function already returned the interface number appended to the IPv6 address in ip_address_to_string(); the problem was that the interface number was not properly specified in the sockaddr argument. Now, the sin6_scope_id field (which contains the interface number on Windows) is correctly set, to the interface number of the "from" sockaddr argument. From what I understand, one problem was that the IPv6 address was discovered twice; once with the mDNS socket on IPv6, and once with the mDNS socket on IPv4. The AAAA entry discovered from the IPv4 socket would override the one obtained from the IPv6 socket, but wouldn't contain information about the interface number. Address this issue by only handling AAAA entries on the IPv6 interface. Signed-off-by: Paul Cercueil <[email protected]>
- Loading branch information