From: Günther Deschner Date: Tue, 28 Apr 2009 10:02:22 +0000 (+0200) Subject: s3-cldap: check for zero ip address in ads_cldap_netlogon(). X-Git-Tag: tdb-1.1.5~871 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e4cd873e34ba5fd394438136798393ba1c04ed2;p=thirdparty%2Fsamba.git s3-cldap: check for zero ip address in ads_cldap_netlogon(). Guenther --- diff --git a/source3/libads/cldap.c b/source3/libads/cldap.c index d941ba60cd6..4c3716a470f 100644 --- a/source3/libads/cldap.c +++ b/source3/libads/cldap.c @@ -44,7 +44,14 @@ bool ads_cldap_netlogon(TALLOC_CTX *mem_ctx, int ret; struct tsocket_address *dest_addr; + /* TODO: support ipv6 */ + addr = interpret_addr2(server); + if (is_zero_ip_v4(addr)) { + DEBUG(2,("Failed to resolve[%s] into an address for cldap\n", + server)); + return false; + } dest_str = inet_ntop(AF_INET, &addr, addrstr, sizeof(addrstr)); if (!dest_str) {