diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c index 2edd2a21d6..45dcf48206 100644 --- a/src/rpc/virnetsocket.c +++ b/src/rpc/virnetsocket.c @@ -205,6 +205,9 @@ int virNetSocketCheckProtocols(bool *hasIPv4, freeifaddrs(ifaddr); + if (hasIPv4 && + virNetSocketCheckProtocolByLookup("127.0.0.1", AF_INET, hasIPv4) < 0) + return -1; if (hasIPv6 && virNetSocketCheckProtocolByLookup("::1", AF_INET6, hasIPv6) < 0)