cifs: make sure server interfaces are requested only for SMB3+
authorShyam Prasad N <sprasad@microsoft.com>
Wed, 13 Mar 2024 10:40:41 +0000 (10:40 +0000)
committerSteve French <stfrench@microsoft.com>
Thu, 14 Mar 2024 18:54:27 +0000 (13:54 -0500)
commit13c0a74747cb7fdadf58c5d3a7d52cfca2d51736
treef2f4f9f640c08cbadc044a2fc89bccac22db4dce
parentdc528770edb138e26a533f8a77de5c4db18ea7f3
cifs: make sure server interfaces are requested only for SMB3+

Some code paths for querying server interfaces make a false
assumption that it will only get called for SMB3+. Since this
function now can get called from a generic code paths, the correct
thing to do is to have specific handler for this functionality
per SMB dialect, and call this handler.

This change adds such a handler and implements this handler only
for SMB 3.0 and 3.1.1.

Cc: stable@vger.kernel.org
Cc: Jan Čermák <sairon@sairon.cz>
Reported-by: Paulo Alcantara <pc@manguebit.com>
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cifsglob.h
fs/smb/client/connect.c
fs/smb/client/smb2ops.c
fs/smb/client/smb2pdu.c