1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-23 20:59:10 +03:00

ldap_server: chunk the writev() calls at 25MB

This should limit the amount we send to GENSEC at a
time where it may help avoid large realloc or memcpy calls.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
This commit is contained in:
Andrew Bartlett
2019-05-14 12:08:03 +12:00
parent e8475f8ec5
commit 8dfad9fa2c
2 changed files with 13 additions and 1 deletions

View File

@ -100,6 +100,11 @@ struct ldapsrv_call {
*/
#define LDAP_SERVER_MAX_REPLY_SIZE ((size_t)(256 * 1024 * 1024))
/*
* Start writing to the network before we hit this size
*/
#define LDAP_SERVER_MAX_CHUNK_SIZE ((size_t)(25 * 1024 * 1024))
struct ldapsrv_service {
struct tstream_tls_params *tls_params;
struct task_server *task;