diff options
author | Thomas Werschlein <thomas.werschlein@geo.uzh.ch> | 2018-08-30 12:29:20 -0400 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2018-09-03 00:21:42 -0400 |
commit | 395a2076b4064f97d3fce03af15210ff2a7bb7f9 (patch) | |
tree | bc69bb83cdad4664033adb4782c36ee0dff1ac9e | |
parent | f801568332321e2b1e7a8bd26c3e4913a312a2ec (diff) |
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: 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>
-rw-r--r-- | fs/cifs/connect.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index c832a8a1970a..7aa08dba4719 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -2547,7 +2547,7 @@ cifs_setup_ipc(struct cifs_ses *ses, struct smb_vol *volume_info) | |||
2547 | if (tcon == NULL) | 2547 | if (tcon == NULL) |
2548 | return -ENOMEM; | 2548 | return -ENOMEM; |
2549 | 2549 | ||
2550 | snprintf(unc, sizeof(unc), "\\\\%s\\IPC$", ses->serverName); | 2550 | snprintf(unc, sizeof(unc), "\\\\%s\\IPC$", ses->server->hostname); |
2551 | 2551 | ||
2552 | /* cannot fail */ | 2552 | /* cannot fail */ |
2553 | nls_codepage = load_nls_default(); | 2553 | nls_codepage = load_nls_default(); |