diff options
Diffstat (limited to 'libcli')
-rw-r--r-- | libcli/cldap/cldap.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libcli/cldap/cldap.c b/libcli/cldap/cldap.c index 896319e75c..33a1bd6571 100644 --- a/libcli/cldap/cldap.c +++ b/libcli/cldap/cldap.c @@ -320,7 +320,11 @@ NTSTATUS cldap_socket_init(TALLOC_CTX *mem_ctx, c->event.ctx = ev; if (!local_addr) { - ret = tsocket_address_inet_from_strings(c, "ip", + /* we use ipv4 here instead of ip, as otherwise we end + up with a PF_INET6 socket, and sendto() for ipv4 + addresses will fail. That breaks cldap name + resolution for winbind to IPv4 hosts. */ + ret = tsocket_address_inet_from_strings(c, "ipv4", NULL, 0, &any); if (ret != 0) { |