1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-21 03:33:16 +03:00

r26401: Don't cache interfaces context in libnetif.

This commit is contained in:
Jelmer Vernooij
2007-12-11 22:23:14 +01:00
committed by Stefan Metzmacher
parent 9faba28749
commit 9f975417cc
33 changed files with 218 additions and 132 deletions

View File

@@ -546,15 +546,19 @@ static void ldapsrv_task_init(struct task_server *task)
if (ldap_service->tls_params == NULL) goto failed;
if (lp_interfaces(task->lp_ctx) && lp_bind_interfaces_only(task->lp_ctx)) {
int num_interfaces = iface_count(task->lp_ctx);
struct interface *ifaces;
int num_interfaces;
int i;
load_interfaces(lp_interfaces(task->lp_ctx), &ifaces);
num_interfaces = iface_count(ifaces);
/* We have been given an interfaces line, and been
told to only bind to those interfaces. Create a
socket per interface and bind to only these.
*/
for(i = 0; i < num_interfaces; i++) {
const char *address = iface_n_ip(task->lp_ctx, i);
const char *address = iface_n_ip(ifaces, i);
status = add_socket(task->event_ctx, task->lp_ctx, model_ops, address, ldap_service);
if (!NT_STATUS_IS_OK(status)) goto failed;
}