DFS mounting wrong path

Luiz Angelo Daros de Luca luizluca at gmail.com
Fri Apr 14 20:34:19 UTC 2023


Hi David,

I opened it at:

https://bugzilla.opensuse.org/show_bug.cgi?id=1210470

I also tried to create a simple setup with a smb server with hundreds
of shares mounted locally but it did not trigger the issue.
I added some wireshark messages (redacted) but I can share raw data in
private if needed.

It looks like the client did follow the right share the first time but
changed its mind before actually mounting it.

Regards,

---
     Luiz Angelo Daros de Luca
            luizluca at gmail.com

Em qui., 13 de abr. de 2023 às 17:37, David Disseldorp
<ddiss at samba.org> escreveu:
>
> Hi Luiz,
>
> On Thu, 13 Apr 2023 16:41:20 -0300, Luiz Angelo Daros de Luca via samba-technical wrote:
>
> > Hello,
> >
> > I have a strange situation with the kernel following DFS directories
> > to the wrong location.
> > In a share with a couple of DFS entries, sometimes the kernel follows
> > the wrong path. Something like this:
> >
> > server: /share/dir/subdir1 -> msdfs:server\share1$
> > server: /share/dir/subdir2 -> msdfs:server\share2$
> > ...
> > server: /share/dir/subdir11 -> msdfs:server\share11$
> > server: /share/dir/subdir12 -> msdfs:server\share12$
> >
> > And in the client, we have:
> >
> > client: //server/dir/subdir1 on /mnt/share/dir/subdir1
> > client: //server/dir/subdir2 on /mnt/share/dir/subdir2
> > ...
> > client: //server/dir/subdir11 on /mnt/share/dir/subdir11
> > client: //server/dir/subdir12 on /mnt/share/dir/subdir11 <<< (should
> > be subdir12!)
> >
> > It always happens with older kernels (5.14 from opensuse/sles 15.4),
> > where the first DFS is always used everywhere. However it still
> > randomly happens with newer kernels like 6.2.9-1-default from opensuse
> > tumbleweed. I can always reproduce it if I do a "ls subdir*" but it
> > does not happen if I first "ls subdir12" and then "ls subdir*". It
> > looks like a race condition, but it might be an off-by-one case as I
> > only observed that with the last DFS in the directory (12th in my real
> > case).
> >
> > Has anyone seen this behavior?
>
> Yes, I've seen something like this, but didn't get a chance to look
> closer. Please raise a ticket on openSUSE / samba / kernel bugzilla
> tracker of your choice and add the reproducer details :)
>
> Cheers, David



More information about the samba-technical mailing list