]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: use the expiry output of dns_query to schedule next resolution
authorShyam Prasad N <sprasad@microsoft.com>
Tue, 18 May 2021 15:05:50 +0000 (15:05 +0000)
committerSteve French <stfrench@microsoft.com>
Wed, 14 Jul 2021 15:06:03 +0000 (10:06 -0500)
commite50d679242f87ae38cf290e20eabed587bf96f6d
tree519eb1c02f57990884daec5513bdb6e62032585f
parent01da9c8979f3d24bb75ef7080a8d9915e88dff94
cifs: use the expiry output of dns_query to schedule next resolution

We recently fixed DNS resolution of the server hostname during reconnect.
However, server IP address may change, even when the old one continues
to server (although sub-optimally).

We should schedule the next DNS resolution based on the TTL of
the DNS record used for the last resolution. This way, we resolve the
server hostname again when a DNS record expires.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Cc: <stable@vger.kernel.org> # v5.11+
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifs_dfs_ref.c
fs/cifs/cifsglob.h
fs/cifs/connect.c
fs/cifs/dns_resolve.c
fs/cifs/dns_resolve.h
fs/cifs/misc.c