]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cifs: fix mount on old smb servers
authorPaulo Alcantara <pc@manguebit.com>
Thu, 16 Feb 2023 18:33:22 +0000 (15:33 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:34:05 +0000 (09:34 +0100)
commite49a6d569d7c4d4c20271cf90463383c0e627bc3
tree304ff8067e85baaa65bcfbf017f531c48842596e
parent8db5028479f85df05f9937dd7f64180ee130f7f3
cifs: fix mount on old smb servers

commit d99e86ebde2d7b3a04190f8d14de5bf6814bf10f upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/connect.c