• Paulo Alcantara's avatar
    cifs: set a minimum of 120s for next dns resolution · 4ac0536f
    Paulo Alcantara authored
    With commit 506c1da4 ("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: 506c1da4 ("cifs: use the expiry output of dns_query to schedule next resolution")
    Signed-off-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
    Reviewed-by: default avatarShyam Prasad N <sprasad@microsoft.com>
    Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
    4ac0536f
connect.c 114 KB