aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorGravatar Anders Kaseorg <andersk@mit.edu>2014-09-29 16:28:50 -0400
committerGravatar John Hood <cgull@glup.org>2015-05-28 22:49:46 -0400
commite7903f0de2b93f729fbf6b524145e4d4309c95f3 (patch)
tree8de0a9f82175365dd4a2614b62a0a9531073e6b9 /scripts
parent14bdd8f00f5a7e0acbb2a607a5d84ae6c151aaf8 (diff)
scripts/mosh: Allow IO::Socket::INET6 as an alternative to IO::Socket::IP
Some systems have IO::Socket::INET6 preinstalled, so we might as well accept either. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mosh.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/mosh.pl b/scripts/mosh.pl
index 6a3aea6..8c19138 100755
--- a/scripts/mosh.pl
+++ b/scripts/mosh.pl
@@ -172,7 +172,10 @@ if ( not defined $bind_ip or $bind_ip =~ m{^ssh$}i ) {
if ( defined $fake_proxy ) {
use Errno qw(EINTR);
- BEGIN { eval { require IO::Socket::IP; IO::Socket::IP->import('-register'); }; }
+ BEGIN {
+ eval { require IO::Socket::IP; IO::Socket::IP->import('-register'); 1 } or
+ eval { require IO::Socket::INET6 };
+ }
use POSIX qw(_exit);
my ( $host, $port ) = @ARGV;