mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
rpc: allow selection of TCP address family
By default, getaddrinfo() will return addresses for both IPv4 and IPv6 if both protocols are enabled, and so the RPC code will listen/connect to both protocols too. There may be cases where it is desirable to restrict this to just one of the two protocols, so add an 'int family' parameter to all the TCP related APIs. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
@@ -509,6 +509,7 @@ daemonSetupNetworking(virNetServerPtr srv,
|
||||
config->listen_addr, config->tcp_port);
|
||||
if (!(svcTCP = virNetServerServiceNewTCP(config->listen_addr,
|
||||
config->tcp_port,
|
||||
AF_UNSPEC,
|
||||
config->auth_tcp,
|
||||
#if WITH_GNUTLS
|
||||
NULL,
|
||||
@@ -552,6 +553,7 @@ daemonSetupNetworking(virNetServerPtr srv,
|
||||
if (!(svcTLS =
|
||||
virNetServerServiceNewTCP(config->listen_addr,
|
||||
config->tls_port,
|
||||
AF_UNSPEC,
|
||||
config->auth_tls,
|
||||
ctxt,
|
||||
false,
|
||||
|
||||
Reference in New Issue
Block a user