summaryrefslogtreecommitdiff
path: root/source4/cldap_server/cldap_server.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-10-02 21:55:26 -0700
committerAndrew Tridgell <tridge@samba.org>2008-10-02 21:55:26 -0700
commit89a67bb60c3b88d5054a81085fb400930cfd5c55 (patch)
treee36da81c29d80ef6c186d986525d1d858e964d67 /source4/cldap_server/cldap_server.c
parent14378d7c4cfff171e7c005c210abe253a2d7dea3 (diff)
downloadsamba-89a67bb60c3b88d5054a81085fb400930cfd5c55.tar.gz
we need to listen on all interfaces in the CLDAP server as the windows
CDLAP client ignores replies from the wrong IP
Diffstat (limited to 'source4/cldap_server/cldap_server.c')
-rw-r--r--source4/cldap_server/cldap_server.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/source4/cldap_server/cldap_server.c b/source4/cldap_server/cldap_server.c
index 310fb564e0f..240f2b1dc23 100644
--- a/source4/cldap_server/cldap_server.c
+++ b/source4/cldap_server/cldap_server.c
@@ -127,6 +127,7 @@ static NTSTATUS cldapd_startup_interfaces(struct cldapd_server *cldapd, struct l
int num_interfaces;
TALLOC_CTX *tmp_ctx = talloc_new(cldapd);
NTSTATUS status;
+ int i;
num_interfaces = iface_count(ifaces);
@@ -135,14 +136,14 @@ static NTSTATUS cldapd_startup_interfaces(struct cldapd_server *cldapd, struct l
if (!lp_bind_interfaces_only(lp_ctx)) {
status = cldapd_add_socket(cldapd, lp_ctx, "0.0.0.0");
NT_STATUS_NOT_OK_RETURN(status);
- } else {
- int i;
-
- for (i=0; i<num_interfaces; i++) {
- const char *address = talloc_strdup(tmp_ctx, iface_n_ip(ifaces, i));
- status = cldapd_add_socket(cldapd, lp_ctx, address);
- NT_STATUS_NOT_OK_RETURN(status);
- }
+ }
+
+ /* now we have to also listen on the specific interfaces,
+ so that replies always come from the right IP */
+ for (i=0; i<num_interfaces; i++) {
+ const char *address = talloc_strdup(tmp_ctx, iface_n_ip(ifaces, i));
+ status = cldapd_add_socket(cldapd, lp_ctx, address);
+ NT_STATUS_NOT_OK_RETURN(status);
}
talloc_free(tmp_ctx);