*/
FR_LDAP_COMMON_CONF(proto_ldap_sync_ldap_t),
+ /*
+ * Network tunable parameters
+ */
+ { FR_CONF_OFFSET_IS_SET("recv_buff", FR_TYPE_UINT32, proto_ldap_sync_ldap_t, recv_buff) },
+
CONF_PARSER_TERMINATOR
};
dir_ctx->conn = conn;
dir_ctx->child_listen = thread->li;
+#ifdef SO_RCVBUF
+ if (inst->recv_buff_is_set) {
+ int opt;
+
+ opt = inst->recv_buff;
+ if (setsockopt(ldap_conn->fd, SOL_SOCKET, SO_RCVBUF, &opt, sizeof(int)) < 0) {
+ WARN("Failed setting 'recv_buff': %s", fr_syserror(errno));
+ }
+ }
+#endif
+
/*
* Set the callback which will handle the results of this query
*/
inst->parent = talloc_get_type_abort(dl_inst->parent->data, proto_ldap_sync_t);
inst->cs = conf;
+ if (inst->recv_buff_is_set) {
+ FR_INTEGER_BOUND_CHECK("recv_buff", inst->recv_buff, >=, 32);
+ FR_INTEGER_BOUND_CHECK("recv_buff", inst->recv_buff, <=, INT_MAX);
+ }
+
return 0;
}
//!< and /dev/urandom are unavailable.
uint32_t ldap_debug; //!< Debug flag for the SDK.
+
+ uint32_t recv_buff; //!< How big the kernel's recive buffer should be
+ bool recv_buff_is_set; //!< Whether we were provided with a recv_buff
} proto_ldap_sync_ldap_t;
typedef struct {