Skip to content

Commit 11260c3

Browse files
Paulo AlcantaraSteve French
authored andcommitted
smb: client: fix dfs link mount against w2k8
Customer reported that they couldn't mount their DFS link that was seen by the client as a DFS interlink -- special form of DFS link where its single target may point to a different DFS namespace -- and it turned out that it was just a regular DFS link where its referral header flags missed the StorageServers bit thus making the client think it couldn't tree connect to target directly without requiring further referrals. When the DFS link referral header flags misses the StoraServers bit and its target doesn't respond to any referrals, then tree connect to it. Fixes: a1c0d00 ("cifs: share dfs connections and supers") Cc: stable@vger.kernel.org Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 5d0c230 commit 11260c3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

fs/smb/client/dfs.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,12 @@ static int __dfs_mount_share(struct cifs_mount_ctx *mnt_ctx)
177177
struct dfs_cache_tgt_list tl = DFS_CACHE_TGT_LIST_INIT(tl);
178178

179179
rc = dfs_get_referral(mnt_ctx, ref_path + 1, NULL, &tl);
180-
if (rc)
180+
if (rc) {
181+
rc = cifs_mount_get_tcon(mnt_ctx);
182+
if (!rc)
183+
rc = cifs_is_path_remote(mnt_ctx);
181184
break;
185+
}
182186

183187
tit = dfs_cache_get_tgt_iterator(&tl);
184188
if (!tit) {

0 commit comments

Comments
 (0)