2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 03:32:04 +00:00

Have xCAT client try IPv6 if IPv4 fails

If IPv6 support is added to a system after xcat is running,
then trying to reach 'localhost' may end up being '::1' instead
of '127.0.0.1'.  This will be fine after xCAT restarts from before
IPv6 support being available, but until that time the daemon is
IPv4 only.  Have Client try IPv4 if IPv6 fails to accomodate this
situation.
This commit is contained in:
Jarrod Johnson 2018-10-29 14:48:23 -04:00
parent cb9b8c0a51
commit 8ff0bb805e

View File

@ -232,7 +232,8 @@ sub submit_request {
$pclient = IO::Socket::INET6->new(
%connargs,
);
} else {
}
unless ($pclient) {
$pclient = IO::Socket::INET->new(
PeerAddr => $xcathost,
Timeout => 15,