summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/smb_composite/connect.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/libcli/smb_composite/connect.c b/source4/libcli/smb_composite/connect.c
index 466d86233a..4e9ee48cb7 100644
--- a/source4/libcli/smb_composite/connect.c
+++ b/source4/libcli/smb_composite/connect.c
@@ -355,7 +355,11 @@ static NTSTATUS connect_resolve(struct composite_context *c,
conn->in.hostnames = talloc_array(state->conn, const char *, 1);
NT_STATUS_HAVE_NO_MEMORY(conn->in.hostnames);
- conn->in.hostnames[0] = state->io->in.dest_host;
+ if (state->io->in.called_name != NULL) {
+ conn->in.hostnames[0] = state->io->in.called_name;
+ } else {
+ conn->in.hostnames[0] = state->io->in.dest_host;
+ }
conn->in.ports = NULL;
if (state->io->in.port != 0) {