Commit 3889b19f authored by Sergei Golubchik's avatar Sergei Golubchik

more strict ipv6_ok check in mtr

don't use ipv6 is the check fails for any reason. for example, an
ancient solaris perl didn't have sockaddr_in6() in Socket at all.
parent 8f5030ea
...@@ -35,7 +35,7 @@ sub skip_combinations { ...@@ -35,7 +35,7 @@ sub skip_combinations {
return 0 unless socket my $sock, PF_INET6, SOCK_STREAM, getprotobyname('tcp'); return 0 unless socket my $sock, PF_INET6, SOCK_STREAM, getprotobyname('tcp');
# eval{}, if there's no Socket::sockaddr_in6 at all, old Perl installation # eval{}, if there's no Socket::sockaddr_in6 at all, old Perl installation
eval { connect $sock, sockaddr_in6(7, Socket::IN6ADDR_LOOPBACK) }; eval { connect $sock, sockaddr_in6(7, Socket::IN6ADDR_LOOPBACK) };
return $! != 101; return $@ eq "";
} }
$skip{'include/check_ipv6.inc'} = 'No IPv6' unless ipv6_ok(); $skip{'include/check_ipv6.inc'} = 'No IPv6' unless ipv6_ok();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment