<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/fs/smb/client/dfs_cache.c, branch v6.18.22</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.22</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.22'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-10-30T01:13:05+00:00</updated>
<entry>
<title>smb: client: handle lack of IPC in dfs_cache_refresh()</title>
<updated>2025-10-30T01:13:05+00:00</updated>
<author>
<name>Paulo Alcantara</name>
<email>pc@manguebit.org</email>
</author>
<published>2025-10-23T21:59:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fac56c4651ae95f3f2b468c2cf1884cf0e6d18c1'/>
<id>urn:sha1:fac56c4651ae95f3f2b468c2cf1884cf0e6d18c1</id>
<content type='text'>
In very rare cases, DFS mounts could end up with SMB sessions without
any IPC connections.  These mounts are only possible when having
unexpired cached DFS referrals, hence not requiring any IPC
connections during the mount process.

Try to establish those missing IPC connections when refreshing DFS
referrals.  If the server is still rejecting it, then simply ignore
and leave expired cached DFS referral for any potential DFS failovers.

Reported-by: Jay Shin &lt;jaeshin@redhat.com&gt;
Signed-off-by: Paulo Alcantara (Red Hat) &lt;pc@manguebit.org&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: linux-cifs@vger.kernel.org
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: get rid of kstrdup() in get_ses_refpath()</title>
<updated>2025-02-06T03:09:07+00:00</updated>
<author>
<name>Paulo Alcantara</name>
<email>pc@manguebit.com</email>
</author>
<published>2025-02-05T16:41:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=be1963dd4ce4e467f062b023d1e696f40c926a04'/>
<id>urn:sha1:be1963dd4ce4e467f062b023d1e696f40c926a04</id>
<content type='text'>
After commit 36008fe6e3dc ("smb: client: don't try following DFS links
in cifs_tree_connect()"), TCP_Server_Info::leaf_fullpath will no
longer be changed, so there is no need to kstrdup() it.

Signed-off-by: Paulo Alcantara (Red Hat) &lt;pc@manguebit.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: get rid of TCP_Server_Info::refpath_lock</title>
<updated>2025-01-23T02:13:49+00:00</updated>
<author>
<name>Paulo Alcantara</name>
<email>pc@manguebit.com</email>
</author>
<published>2025-01-17T20:38:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0a9b00e5e5c5fc3c77cbfd01e6ffbe77fc7fe74a'/>
<id>urn:sha1:0a9b00e5e5c5fc3c77cbfd01e6ffbe77fc7fe74a</id>
<content type='text'>
TCP_Server_Info::leaf_fullpath is allocated in cifs_get_tcp_session()
and never changed afterwards, so there is no need to serialize its
access.

Signed-off-by: Paulo Alcantara (Red Hat) &lt;pc@manguebit.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: provide dns_resolve_{unc,name} helpers</title>
<updated>2025-01-20T01:34:00+00:00</updated>
<author>
<name>Paulo Alcantara</name>
<email>pc@manguebit.com</email>
</author>
<published>2025-01-07T15:22:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4b1b4c8be9dee9aa1a751cfa3954b2fcfdfe9c3d'/>
<id>urn:sha1:4b1b4c8be9dee9aa1a751cfa3954b2fcfdfe9c3d</id>
<content type='text'>
Some places pass hostnames rather than UNC paths to resolve them to ip
addresses, so provide helpers to handle both cases and then stop
converting hostnames to UNC paths by inserting path delimiters into
them.  Also kill @expiry parameter as it's not used anywhere.

Signed-off-by: Paulo Alcantara (Red Hat) &lt;pc@manguebit.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: fix DFS mount against old servers with NTLMSSP</title>
<updated>2025-01-20T01:34:00+00:00</updated>
<author>
<name>Paulo Alcantara</name>
<email>pc@manguebit.com</email>
</author>
<published>2025-01-03T19:58:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ad46faff1afcc8db72f9954a6ea2296d31259217'/>
<id>urn:sha1:ad46faff1afcc8db72f9954a6ea2296d31259217</id>
<content type='text'>
Old Windows servers will return not fully qualified DFS targets by
default as specified in

  MS-DFSC 3.2.5.5 Receiving a Root Referral Request or Link Referral
  Request

    | Servers SHOULD&lt;30&gt; return fully qualified DNS host names of
    | targets in responses to root referral requests and link referral
    | requests.
    | ...
    | &lt;30&gt; Section 3.2.5.5: By default, Windows Server 2003, Windows
    | Server 2008, Windows Server 2008 R2, Windows Server 2012, and
    | Windows Server 2012 R2 return DNS host names that are not fully
    | qualified for targets.

Fix this by converting all NetBIOS host names from DFS targets to
FQDNs and try resolving them first if DNS domain name was provided in
NTLMSSP CHALLENGE_MESSAGE message from previous SMB2_SESSION_SETUP.
This also prevents the client from translating the DFS target
hostnames to another domain depending on the network domain search
order.

Signed-off-by: Paulo Alcantara (Red Hat) &lt;pc@manguebit.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: allow more DFS referrals to be cached</title>
<updated>2024-11-27T00:46:15+00:00</updated>
<author>
<name>Paulo Alcantara</name>
<email>pc@manguebit.com</email>
</author>
<published>2024-11-26T20:19:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=28ec614f2f9bfb57a76dd387be67bb6054f96b04'/>
<id>urn:sha1:28ec614f2f9bfb57a76dd387be67bb6054f96b04</id>
<content type='text'>
In some DFS setups, a single DFS share may contain hundreds of DFS
links and increasing the DFS cache to allow more referrals to be
cached improves DFS failover as the client will likely find a cached
DFS referral when reconnecting and then avoiding unnecessary remounts.

Signed-off-by: Paulo Alcantara (Red Hat) &lt;pc@manguebit.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: Use str_yes_no() helper function</title>
<updated>2024-11-18T04:20:54+00:00</updated>
<author>
<name>Thorsten Blum</name>
<email>thorsten.blum@linux.dev</email>
</author>
<published>2024-11-12T10:58:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7460bf441656cebc2636189ab9ba9a65a0a8ab86'/>
<id>urn:sha1:7460bf441656cebc2636189ab9ba9a65a0a8ab86</id>
<content type='text'>
Remove hard-coded strings by using the str_yes_no() helper function.

Signed-off-by: Thorsten Blum &lt;thorsten.blum@linux.dev&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: fix DFS interlink failover</title>
<updated>2024-09-25T02:51:48+00:00</updated>
<author>
<name>Paulo Alcantara</name>
<email>pc@manguebit.com</email>
</author>
<published>2024-09-18T05:03:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4f42a8b54b5c6e36519aef3cb1f6210e54abd451'/>
<id>urn:sha1:4f42a8b54b5c6e36519aef3cb1f6210e54abd451</id>
<content type='text'>
The DFS interlinks point to different DFS namespaces so make sure to
use the correct DFS root server to chase any DFS links under it by
storing the SMB session in dfs_ref_walk structure and then using it on
every referral walk.

Signed-off-by: Paulo Alcantara (Red Hat) &lt;pc@manguebit.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: improve purging of cached referrals</title>
<updated>2024-09-25T02:51:48+00:00</updated>
<author>
<name>Paulo Alcantara</name>
<email>pc@manguebit.com</email>
</author>
<published>2024-09-18T05:03:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9190cc0c97aafdae06015d468c6ca3991e32a23a'/>
<id>urn:sha1:9190cc0c97aafdae06015d468c6ca3991e32a23a</id>
<content type='text'>
Purge cached referrals that have a single target when reaching maximum
of cache size as the client won't need them to failover.  Otherwise
remove oldest cache entry.

Signed-off-by: Paulo Alcantara (Red Hat) &lt;pc@manguebit.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
<entry>
<title>smb: client: avoid unnecessary reconnects when refreshing referrals</title>
<updated>2024-09-25T02:51:47+00:00</updated>
<author>
<name>Paulo Alcantara</name>
<email>pc@manguebit.com</email>
</author>
<published>2024-09-18T05:03:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=242d23efc987151ecd34bc0cae4c0b737494fc40'/>
<id>urn:sha1:242d23efc987151ecd34bc0cae4c0b737494fc40</id>
<content type='text'>
Do not mark tcons for reconnect when current connection matches any of
the targets returned by new referral even when there is no cached
entry.

Signed-off-by: Paulo Alcantara (Red Hat) &lt;pc@manguebit.com&gt;
Signed-off-by: Steve French &lt;stfrench@microsoft.com&gt;
</content>
</entry>
</feed>
