diff options
-rw-r--r-- | source4/libcli/smb_composite/connect.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/libcli/smb_composite/connect.c b/source4/libcli/smb_composite/connect.c index 81a82ad427..785b0d076b 100644 --- a/source4/libcli/smb_composite/connect.c +++ b/source4/libcli/smb_composite/connect.c @@ -302,7 +302,8 @@ static NTSTATUS connect_socket(struct composite_context *c, state->transport = smbcli_transport_init(state->sock, state, True); NT_STATUS_HAVE_NO_MEMORY(state->transport); - if (state->io->in.called_name != NULL) { + if (is_ipaddress(state->sock->hostname) && + (state->io->in.called_name != NULL)) { /* If connecting to an IP address, we might want the real name * of the host for later kerberos. The called name is a better * approximation */ |