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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This change corresponds to the buffer size for the UNC (Aurélien Aptel), prevents authentication to be forced down to NTLM (Tom Talpey) and allows access to a Microsoft fileserver failover cluster behind a 1:1 NAT firewall.

Signed-off-by: Thomas Werschlein <thomas.werschlein@xxxxxxxxxx>
---
 fs/cifs/connect.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)
 	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();
-- 
2.18.0



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux