summaryrefslogtreecommitdiff
path: root/src/rpc/virnetserverservice.c
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2015-05-21 15:51:28 +0100
committerDaniel P. Berrange <berrange@redhat.com>2015-06-11 12:11:18 +0100
commitd587704cc797735db794ac6f6cf9aa672746f94a (patch)
tree69fe24a01b81d7f63b4fa232f9ce0be3793c5c88 /src/rpc/virnetserverservice.c
parentc0ef99525d55aecbcf84dea73ba6753c243680ca (diff)
downloadlibvirt-d587704cc797735db794ac6f6cf9aa672746f94a.tar.gz
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>
Diffstat (limited to 'src/rpc/virnetserverservice.c')
-rw-r--r--src/rpc/virnetserverservice.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rpc/virnetserverservice.c b/src/rpc/virnetserverservice.c
index 9087473efd..4df26cb52f 100644
--- a/src/rpc/virnetserverservice.c
+++ b/src/rpc/virnetserverservice.c
@@ -143,6 +143,7 @@ virNetServerServiceNewFDOrUNIX(const char *path,
virNetServerServicePtr virNetServerServiceNewTCP(const char *nodename,
const char *service,
+ int family,
int auth,
#if WITH_GNUTLS
virNetTLSContextPtr tls,
@@ -169,6 +170,7 @@ virNetServerServicePtr virNetServerServiceNewTCP(const char *nodename,
if (virNetSocketNewListenTCP(nodename,
service,
+ family,
&svc->socks,
&svc->nsocks) < 0)
goto error;