diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2024-01-06 19:32:53 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2024-01-06 19:32:53 +0000 |
commit | 3d706f962137ee594173323e65ad1afd442eb0a4 (patch) | |
tree | 6c086467fd93338da0aaaf881cf286f6a38298c6 | |
parent | 8b19c4f273613b0477b13d6579e59396084671fc (diff) |
ip/ppp: lower echo timeout to 2 periods (10 seconds)
it usually never recovers...
-rw-r--r-- | sys/src/cmd/ip/ppp/ppp.c | 2 | ||||
-rw-r--r-- | sys/src/cmd/ip/ppp/ppp.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/sys/src/cmd/ip/ppp/ppp.c b/sys/src/cmd/ip/ppp/ppp.c index 634c5df96..e3d917875 100644 --- a/sys/src/cmd/ip/ppp/ppp.c +++ b/sys/src/cmd/ip/ppp/ppp.c @@ -1524,7 +1524,7 @@ static void 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); diff --git a/sys/src/cmd/ip/ppp/ppp.h b/sys/src/cmd/ip/ppp/ppp.h index 541e3a9db..8ea2bf4fd 100644 --- a/sys/src/cmd/ip/ppp/ppp.h +++ b/sys/src/cmd/ip/ppp/ppp.h @@ -172,6 +172,7 @@ enum { 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 */ |