]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
cifs: set a minimum of 120s for next dns resolution
authorPaulo Alcantara <pc@cjr.nz>
Wed, 15 Dec 2021 14:35:26 +0000 (07:35 -0700)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Thu, 13 Jan 2022 17:43:11 +0000 (18:43 +0100)
commite2ca2b311e5c9f04453b64a798015a5f05bf5171
treedb62a06e40c177b94224cb3409b4adf213a652c7
parent872eaf853d5f0c2dd54e5df1902d0c4c7631974a
cifs: set a minimum of 120s for next dns resolution

BugLink: https://bugs.launchpad.net/bugs/1954926
With commit 506c1da44fee ("cifs: use the expiry output of dns_query to
schedule next resolution") and after triggering the first reconnect,
the next async dns resolution of tcp server's hostname would be
scheduled based on dns_resolver's key expiry default, which happens to
default to 5s on most systems that use key.dns_resolver for upcall.

As per key.dns_resolver.conf(5):

       default_ttl=<number>
              The  number  of  seconds  to  set  as the expiration on a cached
              record.  This will be overridden if the program manages  to  re-
              trieve  TTL  information along with the addresses (if, for exam-
              ple, it accesses the DNS directly).  The default is  5  seconds.
              The value must be in the range 1 to INT_MAX.

Make the next async dns resolution no shorter than 120s as we do not
want to be upcalling too often.

Cc: stable@vger.kernel.org
Fixes: 506c1da44fee ("cifs: use the expiry output of dns_query to schedule next resolution")
Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
(cherry picked from commit 4ac0536f8874a903a72bddc57eb88db774261e3a)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
fs/cifs/cifsglob.h
fs/cifs/connect.c