<HTML>
Hi Guys<BR>
<BR>
Currently the CIFS code only parses and returns the first target of a<BR>
multi-target DFS referral, this patch fixes multi-target DFS referrals.<BR>
<BR>
Signed-off-by: Darren Williams darren.w(AT)computer.org<BR>
<BR>
---<BR>
<BR>
After testing and playing with DFS and DFS failover, I discovered that<BR>
the code was not parsing the DFS referral link correctly and only<BR>
returning the first target of a multi target path, this patch fixes the<BR>
issue and allow Linux CIFS to handle DFS failover.<BR>
<BR>
I have only test my scenario which is DFS referrals based users home<BR>
directory locations, i.e. <BR>
<BR>
&gt; test-home -&gt; msdfs:test-samba2.xxxx.com\test-home,test-samba1.xxxx.com\test-home<BR>
<BR>
I have not tested true DFS failover since I do not have the resources<BR>
available.<BR>
<BR>
Hope this helps<BR>
Darren<BR>
<BR>
--- linux-2.6.31.6.new/fs/cifs/cifssmb.c.orig&nbsp;&nbsp; 2009-11-26<BR>
01:47:05.000000000 +1100<BR>
+++ linux-2.6.31.6.new/fs/cifs/cifssmb.c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2009-11-26<BR>
01:32:34.000000000 +1100<BR>
@@ -3952,7 +3952,7 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* collect neccessary data from referrals */<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (i = 0; i &lt; *num_of_nodes; i++) {<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (i = 0; i &lt; *num_of_nodes; i++, ref++) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; char *temp;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int max_len;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct dfs_info3_param *node = (*target_nodes)+i;<BR>
<BR>
<BR>
 </HTML>
<BR>