git: c3c739c25663 - stable/12 - Wait a maximum of 300 seconds for network send/recv in libsa

From: Kyle Evans <kevans_at_FreeBSD.org>
Date: Fri, 08 Oct 2021 06:10:24 UTC
The branch stable/12 has been updated by kevans:

URL: https://cgit.FreeBSD.org/src/commit/?id=c3c739c25663dec34369027edfe3cd0d85693096

commit c3c739c25663dec34369027edfe3cd0d85693096
Author:     Rebecca Cran <bcran@FreeBSD.org>
AuthorDate: 2018-12-20 19:27:46 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2021-10-08 02:41:01 +0000

    Wait a maximum of 300 seconds for network send/recv in libsa
    
    The reason for this change is that currently, a send/recv
    takes many hours to time out.
    This is suboptimal in the bootloader because it means for example
    that NFS will take hours to fail before allowing subsequent access
    methods such as gzip to be tried.
    
    Setting MAXWAIT to 300 seconds (5 minutes) still allows slow
    connections of 1Mb to be used to download a 30MB kernel file.
    
    (cherry picked from commit d5cee48f3e65662051e15c85e4fc1841d72977fe)
---
 stand/libsa/net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stand/libsa/net.c b/stand/libsa/net.c
index 1834a7525e76..3142616a5bf0 100644
--- a/stand/libsa/net.c
+++ b/stand/libsa/net.c
@@ -63,7 +63,7 @@ __FBSDID("$FreeBSD$");
  * timeout is hit.
  */
 #ifndef MAXWAIT
-#define MAXWAIT 0	/* seconds */
+#define MAXWAIT 300	/* seconds */
 #endif
 
 #if MAXWAIT < 0