diff options
author | Shyam Prasad N <sprasad@microsoft.com> | 2021-05-18 18:05:50 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2021-07-14 18:06:03 +0300 |
commit | 506c1da44fee32ba1d3a70413289ad58c772bba6 (patch) | |
tree | 519eb1c02f57990884daec5513bdb6e62032585f /fs/cifs/dns_resolve.h | |
parent | e73f0f0ee7541171d89f2e2491130c7771ba58d3 (diff) | |
download | linux-506c1da44fee32ba1d3a70413289ad58c772bba6.tar.xz |
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/dns_resolve.h')
-rw-r--r-- | fs/cifs/dns_resolve.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/dns_resolve.h b/fs/cifs/dns_resolve.h index 5be060b82b13..9fa2807ef79e 100644 --- a/fs/cifs/dns_resolve.h +++ b/fs/cifs/dns_resolve.h @@ -12,7 +12,7 @@ #define _DNS_RESOLVE_H #ifdef __KERNEL__ -extern int dns_resolve_server_name_to_ip(const char *unc, char **ip_addr); +extern int dns_resolve_server_name_to_ip(const char *unc, char **ip_addr, time64_t *expiry); #endif /* KERNEL */ #endif /* _DNS_RESOLVE_H */ |