smb3: use netname when available on secondary channels
authorShyam Prasad N <sprasad@microsoft.com>
Wed, 22 Jun 2022 17:36:36 +0000 (12:36 -0500)
committerSteve French <stfrench@microsoft.com>
Thu, 23 Jun 2022 00:46:53 +0000 (19:46 -0500)
commit9de74996a739bf0b7b5d8c260bd207ad6007442b
tree3cb4df78e33a5f24bc1f66d6a9f49838b3ae16fb
parent73130a7b1ac92c9f30e0a255951129f4851c5794
smb3: use netname when available on secondary channels

Some servers do not allow null netname contexts, which would cause
multichannel to revert to single channel when mounting to some
servers (e.g. Azure xSMB). The previous patch fixed that by avoiding
incorrectly sending the netname context when there would be a null
hostname sent in the netname context, while this patch fixes the null
hostname for the secondary channel by using the hostname of the
primary channel for the secondary channel.

Fixes: 4c14d7043fede ("cifs: populate empty hostnames for extra channels")
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smb2pdu.c