Commit 395a2076 authored by Thomas Werschlein's avatar Thomas Werschlein Committed by Steve French

cifs: connect to servername instead of IP for IPC$ share

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: default avatarThomas Werschlein <thomas.werschlein@geo.uzh.ch>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
CC: Tom Talpey <ttalpey@microsoft.com>
Reviewed-by: default avatarAurelien Aptel <aaptel@suse.com>
CC: Stable <stable@vger.kernel.org>
parent f8015683
...@@ -2547,7 +2547,7 @@ cifs_setup_ipc(struct cifs_ses *ses, struct smb_vol *volume_info) ...@@ -2547,7 +2547,7 @@ cifs_setup_ipc(struct cifs_ses *ses, struct smb_vol *volume_info)
if (tcon == NULL) if (tcon == NULL)
return -ENOMEM; return -ENOMEM;
snprintf(unc, sizeof(unc), "\\\\%s\\IPC$", ses->serverName); snprintf(unc, sizeof(unc), "\\\\%s\\IPC$", ses->server->hostname);
/* cannot fail */ /* cannot fail */
nls_codepage = load_nls_default(); nls_codepage = load_nls_default();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment