Bug 7294 - mount.cifs does not follow multi target DFS referrals
Summary: mount.cifs does not follow multi target DFS referrals
Alias: None
Product: CifsVFS
Classification: Unclassified
Component: kernel fs (show other bugs)
Version: 2.6
Hardware: All Linux
: P3 normal
Target Milestone: ---
Assignee: Steve French
QA Contact:
Depends on:
Reported: 2010-03-25 13:14 UTC by dsw
Modified: 2011-02-15 03:05 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description dsw 2010-03-25 13:14:56 UTC
When you have the following DFS referrals in place:

home -> msdfs:serverA\homeA,serverB\homeB

mount.cifs does not attempt to lookup serverB regardless of serverA availability or permissions set on shares, i.e. distributed home directories.

The following patch against 2.6.34-rc2 increments the referral pointer to resolve the problem

Signed-off-by: Darren Williams <darren.w at computer.org>


diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 7cc7f83..4e83477 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -4020,7 +4020,7 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
        /* collect necessary data from referrals */
-       for (i = 0; i < *num_of_nodes; i++) {
+       for (i = 0; i < *num_of_nodes; i++, ref++) {
                char *temp;
                int max_len;
                struct dfs_info3_param *node = (*target_nodes)+i;
Comment 1 Suresh Jayaraman (mail address is dead) 2010-10-25 23:41:30 UTC
Could you please send your patch with analysis to linux-cifs@vger.kernel.org ? Generally, discussions about patches, reviews happens in the mailing list.