cifs: fix mount on old smb servers
authorPaulo Alcantara <pc@manguebit.com>
Thu, 16 Feb 2023 18:33:22 +0000 (15:33 -0300)
committerSteve French <stfrench@microsoft.com>
Thu, 1 Jun 2023 04:02:07 +0000 (23:02 -0500)
commitfe89772b2361f4ac8116febda41ef4039dbb2a44
tree3188e84bcd9384b6aec1a39360da6b33a773fffb
parent51a175f0ebd9d3186ac608f94c092c469ab73327
cifs: fix mount on old smb servers

The client was sending rfc1002 session request packet with a wrong
length field set, therefore failing to mount shares against old SMB
servers over port 139.

Fix this by calculating the correct length as specified in rfc1002.

Fixes: d7173623bf0b ("cifs: use ALIGN() and round_up() macros")
Cc: stable@vger.kernel.org
Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/connect.c