From 8ff0bb805e80aac8a0c042d0a9a35b7899e6dbfe Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 29 Oct 2018 14:48:23 -0400 Subject: [PATCH] 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. --- perl-xCAT/xCAT/Client.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/Client.pm b/perl-xCAT/xCAT/Client.pm index 888c9242a..e6b1e1d04 100644 --- a/perl-xCAT/xCAT/Client.pm +++ b/perl-xCAT/xCAT/Client.pm @@ -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,