diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-08-28 02:37:38 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:34:52 -0500 |
commit | 75c29073ce12723598e4e204ccb616cd52fa2c13 (patch) | |
tree | 6940325b186d1cd2637320dfde5bdc5f080bc1fa /source4/lib/socket/connect.c | |
parent | c9d937b7ebd372a91cbd94130e5995c76e155a0a (diff) | |
download | samba-75c29073ce12723598e4e204ccb616cd52fa2c13.tar.gz |
r9704: r9684@blu: tridge | 2005-08-27 19:38:31 +1000
don't try to call the name resolver on non-ipv4 names!
(This used to be commit 4bb3d36fe6705bc625fe4122500f681ab7f2dc53)
Diffstat (limited to 'source4/lib/socket/connect.c')
-rw-r--r-- | source4/lib/socket/connect.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source4/lib/socket/connect.c b/source4/lib/socket/connect.c index 567c8f41d28..bb4d7cc8434 100644 --- a/source4/lib/socket/connect.c +++ b/source4/lib/socket/connect.c @@ -74,15 +74,20 @@ NTSTATUS socket_connect_ev(struct socket_context *sock, { TALLOC_CTX *tmp_ctx = talloc_new(sock); NTSTATUS status; - + /* we resolve separately to ensure that the name resolutions happens asynchronously + + the check for ipv4 is ugly, but how to do it better? We don't want + to try to resolve unix pathnames here */ - status = connect_resolve(tmp_ctx, server_address, ev, &server_address); - if (!NT_STATUS_IS_OK(status)) { - talloc_free(tmp_ctx); - return status; + if (strcmp(sock->backend_name, "ipv4") == 0) { + status = connect_resolve(tmp_ctx, server_address, ev, &server_address); + if (!NT_STATUS_IS_OK(status)) { + talloc_free(tmp_ctx); + return status; + } } set_blocking(socket_get_fd(sock), False); |