linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cifs: use the expiry output of dns_query to schedule next resolution
@ 2021-05-20 18:00 Shyam Prasad N
  2021-05-20 18:09 ` Paulo Alcantara
  0 siblings, 1 reply; 2+ messages in thread
From: Shyam Prasad N @ 2021-05-20 18:00 UTC (permalink / raw)
  To: Steve French, Paulo Alcantara, Aurélien Aptel, CIFS

Hi,

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.

Please review the changes.

@Paulo Alcantara I know this can create merge conflicts when your
patch gets merged.
I can rebase my changes on top of yours when it gets merged.

@David Howells
Something worth noting here is that the keyutils key.dns_resolver
upcall resolves the hostname, but does not return the expiry time. I'm
falling back to a default value of 600s for now.

I assumed that this commit of yours was a workaround to this exact
problem in getaddrinfo().
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/commit/?id=75e7568dc516db698093b33ea273e1b4a30b70be
Have you since been able derive the TTL field from the DNS records?

https://github.com/sprasad-microsoft/smb-kernel-client/pull/1

-- 
Regards,
Shyam

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] cifs: use the expiry output of dns_query to schedule next resolution
  2021-05-20 18:00 [PATCH] cifs: use the expiry output of dns_query to schedule next resolution Shyam Prasad N
@ 2021-05-20 18:09 ` Paulo Alcantara
  0 siblings, 0 replies; 2+ messages in thread
From: Paulo Alcantara @ 2021-05-20 18:09 UTC (permalink / raw)
  To: Shyam Prasad N, Steve French, Aurélien Aptel, CIFS

Shyam Prasad N <nspmangalore@gmail.com> writes:

> @Paulo Alcantara I know this can create merge conflicts when your
> patch gets merged.
> I can rebase my changes on top of yours when it gets merged.

No worries.  Thanks for letting me know.

I'll rebase mine on top of yours when I finish the dfs series.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-20 18:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20 18:00 [PATCH] cifs: use the expiry output of dns_query to schedule next resolution Shyam Prasad N
2021-05-20 18:09 ` Paulo Alcantara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).