diff options
author | Shyam Prasad N <sprasad@microsoft.com> | 2021-05-18 17:05:50 +0200 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2021-07-14 17:06:03 +0200 |
commit | 506c1da44fee32ba1d3a70413289ad58c772bba6 (patch) | |
tree | 519eb1c02f57990884daec5513bdb6e62032585f /fs/cifs/cifs_dfs_ref.c | |
parent | Linux 5.14-rc1 (diff) | |
download | linux-506c1da44fee32ba1d3a70413289ad58c772bba6.tar.xz linux-506c1da44fee32ba1d3a70413289ad58c772bba6.zip |
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>
Diffstat (limited to 'fs/cifs/cifs_dfs_ref.c')
-rw-r--r-- | fs/cifs/cifs_dfs_ref.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c index 57f91311fdaa..fa131da01a5f 100644 --- a/fs/cifs/cifs_dfs_ref.c +++ b/fs/cifs/cifs_dfs_ref.c @@ -176,7 +176,7 @@ char *cifs_compose_mount_options(const char *sb_mountdata, } } - rc = dns_resolve_server_name_to_ip(name, &srvIP); + rc = dns_resolve_server_name_to_ip(name, &srvIP, NULL); if (rc < 0) { cifs_dbg(FYI, "%s: Failed to resolve server part of %s to IP: %d\n", __func__, name, rc); |