[patch] Allow all DFS failover/multi-target referrals to be followed
Darren Williams <[email protected]> Thu, 26 Nov 2009 06:01:33 +0800
| Newsgroups | gmane.linux.file-systems.cifs |
|---|---|
| Message-ID | <[email protected]> |
--===============0194870418949884906==
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="utf-8"
<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>
> test-home -> 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 2009-11-26<BR>
01:47:05.000000000 +1100<BR>
+++ linux-2.6.31.6.new/fs/cifs/cifssmb.c  =
; 2009-11-26<BR>
01:32:34.000000000 +1100<BR>
@@ -3952,7 +3952,7 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS<BR>
}<BR>
<BR>
/* collect neccessary data from =
referrals */<BR>
- for (i =3D 0; i < *num_of_nodes; i=
++) {<BR>
+ for (i =3D 0; i < *num_of_nodes; i=
++, ref++) {<BR>
&nb=
sp; char *temp;<BR>
&nb=
sp; int max_len;<BR>
&nb=
sp; struct dfs_info3_param *node =3D (*target_nodes)+i;<BR>
<BR>
<BR>
</HTML>
<BR>=
--===============0194870418949884906==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
linux-cifs-client mailing list
[email protected]
https://lists.samba.org/mailman/listinfo/linux-cifs-client
--===============0194870418949884906==--