]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
smb: client: fix DFS interlink failover
authorPaulo Alcantara <pc@manguebit.com>
Wed, 18 Sep 2024 05:03:55 +0000 (02:03 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jul 2025 16:35:18 +0000 (18:35 +0200)
commit03c3cd0c3b67b1a73b4aa6c781df698118974cd5
treecc5be0b2ef0e71be20c753800698f600dcdd9e9e
parentd043b5da37fc9c0b42ad3f5796193aaf20cc1b6a
smb: client: fix DFS interlink failover

[ Upstream commit 4f42a8b54b5c6e36519aef3cb1f6210e54abd451 ]

The DFS interlinks point to different DFS namespaces so make sure to
use the correct DFS root server to chase any DFS links under it by
storing the SMB session in dfs_ref_walk structure and then using it on
every referral walk.

Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Stable-dep-of: 74ebd02163fd ("cifs: all initializations for tcon should happen in tcon_info_alloc")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/smb/client/cifsglob.h
fs/smb/client/cifsproto.h
fs/smb/client/connect.c
fs/smb/client/dfs.c
fs/smb/client/dfs.h
fs/smb/client/dfs_cache.c
fs/smb/client/fs_context.h
fs/smb/client/misc.c
fs/smb/client/namespace.c