Fix IPMI.pm warning message on every packet when IPv6 is possible

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11475 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2012-02-03 22:17:46 +00:00
parent cd5ee8a18c
commit c41fe0e1a3

View File

@ -111,7 +111,7 @@ sub new {
my ($family, $socktype, $protocol, $saddr, $name, $ip, $service);
if ($doipv6) {
($family, $socktype, $protocol, $saddr, $name) = Socket6::getaddrinfo($self->{bmc},623,AF_UNSPEC,SOCK_DGRAM,0);
($ip,$service) = getnameinfo($saddr,$Socket6::NI_NUMERICHOST);
($ip,$service) = getnameinfo($saddr,Socket6::NI_NUMERICHOST);
}
unless ($saddr or $bmc_n = inet_aton($self->{bmc})) {
$self->{error} = "Could not resolve ".$self->{bmc}." to an address";
@ -424,7 +424,7 @@ sub route_ipmiresponse {
#($port,$host) = sockaddr_in6($sockaddr);
#$host = inet_ntoa($host);
if ($doipv6) {
($host,$port) = getnameinfo($sockaddr,$Socket6::NI_NUMERICHOST);
($host,$port) = getnameinfo($sockaddr,Socket6::NI_NUMERICHOST);
} else {
($port,$host) = sockaddr_in($sockaddr);
$host = inet_ntoa($host);