server's process ID (see
.BR getpid (2)).
.TP
-.B sockbuf_max_incoming <integer>
-Specify the maximum incoming LDAP PDU size for anonymous sessions.
+.B sockbuf_max_incoming_client <integer>
+Specify the maximum LDAP PDU size accepted coming from clients.
The default is 262143.
.TP
-.B sockbuf_max_incoming_auth <integer>
-Specify the maximum incoming LDAP PDU size for authenticated sessions.
+.B sockbuf_max_incoming_upstream <integer>
+Specify the maximum LDAP PDU size accepted coming from upstream
+connections.
The default is 4194303.
.TP
.B tcp-buffer [listener=<URL>] [{read|write}=]<size>
c = connection_init( s, peername, flags );
+ {
+ ber_len_t max = sockbuf_max_incoming_client;
+ ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_SET_MAX_INCOMING, &max );
+ }
+
c->c_state = SLAP_C_READY;
event = event_new( base, s, EV_READ|EV_PERSIST, client_read_cb, c );
lload_features_t lload_features;
-ber_len_t sockbuf_max_incoming = SLAP_SB_MAX_INCOMING_DEFAULT;
-ber_len_t sockbuf_max_incoming_auth = SLAP_SB_MAX_INCOMING_AUTH;
+ber_len_t sockbuf_max_incoming_client = SLAP_SB_MAX_INCOMING_CLIENT;
+ber_len_t sockbuf_max_incoming_upstream = SLAP_SB_MAX_INCOMING_UPSTREAM;
int slap_conn_max_pdus_per_cycle = SLAP_CONN_MAX_PDUS_PER_CYCLE_DEFAULT;
ARG_MAGIC,
&config_restrict,
},
- { "sockbuf_max_incoming", "max", 2, 2, 0,
+ { "sockbuf_max_incoming_client", "max", 2, 2, 0,
ARG_BER_LEN_T,
- &sockbuf_max_incoming,
+ &sockbuf_max_incoming_client,
},
- { "sockbuf_max_incoming_auth", "max", 2, 2, 0,
+ { "sockbuf_max_incoming_upstream", "max", 2, 2, 0,
ARG_BER_LEN_T,
- &sockbuf_max_incoming_auth,
+ &sockbuf_max_incoming_upstream,
},
{ "tcp-buffer", "[listener=<listener>] [{read|write}=]size", 0, 0, 0,
#ifdef LDAP_TCP_BUFFER
c->c_sb = ber_sockbuf_alloc();
ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_SET_FD, &s );
- {
- ber_len_t max = sockbuf_max_incoming;
- ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_SET_MAX_INCOMING, &max );
- }
-
#ifdef LDAP_PF_LOCAL
if ( flags & CONN_IS_IPC ) {
#ifdef LDAP_DEBUG
LDAP_SLAPD_F (int) slap_zn_wunlock( void *, void * );
#endif
-LDAP_SLAPD_V (ber_len_t) sockbuf_max_incoming;
-LDAP_SLAPD_V (ber_len_t) sockbuf_max_incoming_auth;
+LDAP_SLAPD_V (ber_len_t) sockbuf_max_incoming_client;
+LDAP_SLAPD_V (ber_len_t) sockbuf_max_incoming_upstream;
LDAP_SLAPD_V (int) slap_conn_max_pdus_per_cycle;
LDAP_SLAPD_V (lload_features_t) lload_features;
#define SLAP_MAX_WORKER_THREADS ( 16 )
-#define SLAP_SB_MAX_INCOMING_DEFAULT ( ( 1 << 18 ) - 1 )
-#define SLAP_SB_MAX_INCOMING_AUTH ( ( 1 << 24 ) - 1 )
+#define SLAP_SB_MAX_INCOMING_CLIENT ( ( 1 << 18 ) - 1 )
+#define SLAP_SB_MAX_INCOMING_UPSTREAM ( ( 1 << 24 ) - 1 )
#define SLAP_CONN_MAX_PDUS_PER_CYCLE_DEFAULT 10
c = connection_init( s, b->b_host, flags );
c->c_private = b;
+ {
+ ber_len_t max = sockbuf_max_incoming_upstream;
+ ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_SET_MAX_INCOMING, &max );
+ }
+
event = event_new( base, s, EV_WRITE, upstream_write_cb, c );
if ( !event ) {
Debug( LDAP_DEBUG_ANY, "upstream_init: "