shithub: riscv

Download patch

ref: 3d706f962137ee594173323e65ad1afd442eb0a4
parent: 8b19c4f273613b0477b13d6579e59396084671fc
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Jan 6 14:32:53 EST 2024

ip/ppp: lower echo timeout to 2 periods (10 seconds)

it usually never recovers...

--- a/sys/src/cmd/ip/ppp/ppp.c
+++ b/sys/src/cmd/ip/ppp/ppp.c
@@ -1524,7 +1524,7 @@
 pingtimer(PPP* ppp)
 {
 	if(ppp->lcp->echotimeout == 0 || ppp->lcp->echoack)
-		ppp->lcp->echotimeout = (3*4*1000+Period-1)/Period;
+		ppp->lcp->echotimeout = Echotimeout;
 	else if(--(ppp->lcp->echotimeout) <= 0){
 		netlog("ppp: echo request timeout\n");
 		terminate(ppp, "echo timeout", 0);
--- a/sys/src/cmd/ip/ppp/ppp.h
+++ b/sys/src/cmd/ip/ppp/ppp.h
@@ -172,6 +172,7 @@
 
 	Period=		5*1000,	/* period of retransmit process (in ms) */
 	Timeout=	20,	/* xmit timeout (in Periods) */
+	Echotimeout=	2,	/* echo timeout (in Periods) */
 	Buflen=		4096,
 
 	MAX_STATES=	16,		/* van jacobson compression states */