From 1b2ddc2e81b3b0b29a26d8821bcabf96043eb11c Mon Sep 17 00:00:00 2001 From: John Hood Date: Thu, 9 Jun 2016 03:31:34 -0400 Subject: [PATCH] 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. --- scripts/mosh.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mosh.pl b/scripts/mosh.pl index acb8234..f60ebce 100755 --- a/scripts/mosh.pl +++ b/scripts/mosh.pl @@ -242,7 +242,7 @@ if ( ! defined $fake_proxy ) { PeerHost => $addr_string, PeerPort => $port, Proto => 'tcp' )) { - print STDERR 'MOSH IP ', $sock->peerhost, "\n"; + print STDERR 'MOSH IP ', $addr_string, "\n"; last; } else { $err = $@;