From af9b6baf6e6b34db388eea1f39c61a0d2abc1b12 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 2aaaaa069..994c9ce4a 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,