From 75c29073ce12723598e4e204ccb616cd52fa2c13 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 28 Aug 2005 02:37:38 +0000 Subject: 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) --- source4/lib/socket/connect.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'source4/lib/socket/connect.c') diff --git a/source4/lib/socket/connect.c b/source4/lib/socket/connect.c index 567c8f41d2..bb4d7cc843 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); -- cgit