diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2011-06-30 11:45:55 +0100 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2011-06-30 18:04:01 +0100 |
commit | 27111b350f86f609cd7149b814587a5b229d79d9 (patch) | |
tree | 0f281f6d39fb1420984ded589808cb164d0c5275 /daemon | |
parent | tests: Add valgrind.supp into EXTRA_DIST (diff) | |
download | libvirt-27111b350f86f609cd7149b814587a5b229d79d9.tar.gz libvirt-27111b350f86f609cd7149b814587a5b229d79d9.tar.bz2 libvirt-27111b350f86f609cd7149b814587a5b229d79d9.zip |
Fix hardcoded limit on client requests in RPC code
The virNetServerClient object had a hardcoded limit of 10 requests
per client. Extend constructor to allow it to be passed in as a
configurable variable. Wire this up to the 'max_client_requests'
config parameter in libvirtd
* daemon/libvirtd.c: Pass max_client_requests into services
* src/rpc/virnetserverservice.c, src/rpc/virnetserverservice.h: Pass
nrequests_client_max to clients
* src/rpc/virnetserverclient.c, src/rpc/virnetserverclient.h: Allow
configurable request limit
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/libvirtd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index d1f80e459..118aa92fa 100644 --- a/daemon/libvirtd.c +++ b/daemon/libvirtd.c @@ -486,6 +486,7 @@ static int daemonSetupNetworking(virNetServerPtr srv, unix_sock_gid, config->auth_unix_rw, false, + config->max_client_requests, NULL))) goto error; if (sock_path_ro && @@ -494,6 +495,7 @@ static int daemonSetupNetworking(virNetServerPtr srv, unix_sock_gid, config->auth_unix_ro, true, + config->max_client_requests, NULL))) goto error; @@ -509,6 +511,7 @@ static int daemonSetupNetworking(virNetServerPtr srv, config->tcp_port, config->auth_tcp, false, + config->max_client_requests, NULL))) goto error; @@ -543,6 +546,7 @@ static int daemonSetupNetworking(virNetServerPtr srv, config->tls_port, config->auth_tls, false, + config->max_client_requests, ctxt))) { virNetTLSContextFree(ctxt); goto error; |