summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorThomas Werschlein <thomas.werschlein@geo.uzh.ch>2018-08-30 18:29:20 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-19 22:41:21 +0200
commit15c4b1902f0e35dd51bb79fca73c50b6d14df699 (patch)
tree0ac6619fb33156b2ba6eb51faeea099cbfa6d9bd /fs
parentdc0416dcd3ab12ec37a7138f5d462aa24d37e4ac (diff)
cifs: connect to servername instead of IP for IPC$ share
commit 395a2076b4064f97d3fce03af15210ff2a7bb7f9 upstream. This patch is required allows access to a Microsoft fileserver failover cluster behind a 1:1 NAT firewall. The change also provides stronger context for authentication and share connection (see MS-SMB2 3.3.5.7 and MS-SRVS 3.1.6.8) as noted by Tom Talpey, and addresses comments about the buffer size for the UNC made by Aurélien Aptel. Signed-off-by: Thomas Werschlein <thomas.werschlein@geo.uzh.ch> Signed-off-by: Steve French <stfrench@microsoft.com> CC: Tom Talpey <ttalpey@microsoft.com> Reviewed-by: Aurelien Aptel <aaptel@suse.com> CC: Stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/connect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 9d02563b2147..44043f809a3c 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2523,7 +2523,7 @@ cifs_setup_ipc(struct cifs_ses *ses, struct smb_vol *volume_info)
if (tcon == NULL)
return -ENOMEM;
- snprintf(unc, sizeof(unc), "\\\\%s\\IPC$", ses->serverName);
+ snprintf(unc, sizeof(unc), "\\\\%s\\IPC$", ses->server->hostname);
/* cannot fail */
nls_codepage = load_nls_default();