Re: [PATCH 2/2] daemon: Introduce max_anonymous_clients

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09.12.2013 15:35, Michal Privoznik wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=981729
> 
> This config tunable allows users to determine the maximum number of
> accepted but yet not authenticated users.
> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  daemon/libvirtd-config.c    |  1 +
>  daemon/libvirtd-config.h    |  1 +
>  daemon/libvirtd.aug         |  1 +
>  daemon/libvirtd.c           |  1 +
>  daemon/libvirtd.conf        |  3 +++
>  daemon/test_libvirtd.aug.in |  1 +
>  src/locking/lock_daemon.c   |  4 ++--
>  src/lxc/lxc_controller.c    |  2 +-
>  src/rpc/virnetserver.c      | 37 +++++++++++++++++++++++++++++++++++--
>  src/rpc/virnetserver.h      |  1 +
>  10 files changed, 47 insertions(+), 5 deletions(-)
> 

D'oh! I've made some changes but didn't amend them. Consider this squashed in:

diff --git a/src/rpc/virnetserver.c b/src/rpc/virnetserver.c
index bbb91d4..62490a7 100644
--- a/src/rpc/virnetserver.c
+++ b/src/rpc/virnetserver.c
@@ -1164,7 +1164,7 @@ void virNetServerRun(virNetServerPtr srv)
                           "nclients_unauth=%zu nclients_unauth_max=%zu",
                           srv->nclients, srv->nclients_max,
                           srv->nclients_unauth, srv->nclients_unauth_max);
-                if ((srv->nclients == srv->nclients_max - 1) &&
+                if ((srv->nclients < srv->nclients_max) &&
                     (srv->nclients_unauth < srv->nclients_unauth_max)) {
                     /* Now it makes sense to accept() a new client. */
                     VIR_DEBUG("Re-enabling services");
@@ -1285,7 +1285,7 @@ size_t virNetServerClientAuth(virNetServerPtr srv,
               srv->nclients, srv->nclients_max,
               srv->nclients_unauth, srv->nclients_unauth_max);
     if ((srv->nclients < srv->nclients_max) &&
-        (srv->nclients_unauth == srv->nclients_unauth_max - 1)) {
+        (srv->nclients_unauth < srv->nclients_unauth_max)) {
         /* Now it makes sense to accept() a new client. */
         VIR_DEBUG("Re-enabling services");
         virNetServerUpdateServicesLocked(srv, true);

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]