[PATCH] cifs: use the expiry output of dns_query to schedule next resolution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux