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>
Mon, 20 Feb 2023 17:48:48 +0000 (11:48 -0600)
commitd99e86ebde2d7b3a04190f8d14de5bf6814bf10f
treec704ddfacbcb4e457580212e5ba61e4b097fc669
parentde036dcaca65cf94bf7ff09c571c077f02bc92b4
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