Make OS X mDNS/Bonjour .local IPv6 addresses work.

OS X advertises IPv6 link-local addresses for .local hostnames.
getaddrinfo() correctly reports interface identifiers for these, but we
were discarding them by using the socket peer host address instead.
This commit is contained in:
John Hood
2016-06-09 03:31:34 -04:00
parent 274b5a4d14
commit 1b2ddc2e81
+1 -1
View File
@@ -242,7 +242,7 @@ if ( ! defined $fake_proxy ) {
PeerHost => $addr_string, PeerHost => $addr_string,
PeerPort => $port, PeerPort => $port,
Proto => 'tcp' )) { Proto => 'tcp' )) {
print STDERR 'MOSH IP ', $sock->peerhost, "\n"; print STDERR 'MOSH IP ', $addr_string, "\n";
last; last;
} else { } else {
$err = $@; $err = $@;