mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user