From dfa6b6c67088fc40fb59738bc53f7c949217060d Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Tue, 19 Apr 2022 02:06:33 +0000 Subject: [PATCH] ip/sol: handle timeout on password entry for digest auth --- sys/src/cmd/ip/sol.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/src/cmd/ip/sol.c b/sys/src/cmd/ip/sol.c index 13f66b61a..c15c94f71 100644 --- a/sys/src/cmd/ip/sol.c +++ b/sys/src/cmd/ip/sol.c @@ -173,9 +173,15 @@ digestauth(char *server, char *user, char *method, char *url) strlen(nc), nc, strlen(nc), n, resp, n, strlen(qop), qop, strlen(qop)); + + /* can get timeout/tls error here, so enable restart once we have the key */ + authok = 1; recv("lb*", &reply, &ok); - if(reply != 0x14 && ok != 4) + if(reply != 0x14 && ok != 4){ + authok = 0; sysfatal("bad digest auth reply: %x %x", reply, ok); + } + return 0; }