search for: too_many_clients_error

Displaying 3 results from an estimated 3 matches for "too_many_clients_error".

2020 Mar 06
1
Re: [PATCH nbdkit v2] New filter: limit: Limit number of clients that can connect.
...nst char *value) > +{ > + if (strcmp (key, "limit") == 0) { > + if (nbdkit_parse_unsigned ("limit", value, &limit) == -1) > + return -1; > + return 0; > + } > + > + return next (nxdata, key, value); > +} > + > +static void > +too_many_clients_error (void) > +{ > + nbdkit_error ("limit: too many clients connected, connection rejected"); > +} > + > +/* We limit connections in the preconnect stage (in particular before > + * any heavyweight NBD or TLS negotiations has been done). However we > + * count connection...
2020 Mar 04
2
[PATCH nbdkit v2] New filter: limit: Limit number of clients that can connect.
This is a second version of the limit filter. v1 was posted here: https://www.redhat.com/archives/libguestfs/2020-March/msg00015.html I didn't bother to repost the other three patches because they are the same. The difference is this version of the filter takes security more seriously. It shouldn't be possible for malicious clients to connect more than limit=N times to the plugin now,
2020 Mar 04
0
[PATCH nbdkit v2] New filter: limit: Limit number of clients that can connect.
..., nbdkit_backend *nxdata, + const char *key, const char *value) +{ + if (strcmp (key, "limit") == 0) { + if (nbdkit_parse_unsigned ("limit", value, &limit) == -1) + return -1; + return 0; + } + + return next (nxdata, key, value); +} + +static void +too_many_clients_error (void) +{ + nbdkit_error ("limit: too many clients connected, connection rejected"); +} + +/* We limit connections in the preconnect stage (in particular before + * any heavyweight NBD or TLS negotiations has been done). However we + * count connections in the open/close calls since cli...