From 278caaf11931ec0c71fc13fd4c4794fae325c404 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 21 May 2023 22:21:08 +0000 Subject: ip/ppp: just use mtu requested from the peer. the mtu negotiation seems wrong. it seems to assume that the peer requests a mtu to us, but actually this doesnt seem to be the case and if the peer doesnt request it, we'd always use Defmntu of 1450, no matter what we set on with -m option. instead, we use the mtu specified with -m option and always request it to the peer. if the peer requests a different mtu we use that instead. this at least gives some control and allows to just use the correct mtu from pppoe (1492). --- sys/src/cmd/ip/ppp/ppp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/src/cmd/ip/ppp/ppp.c b/sys/src/cmd/ip/ppp/ppp.c index 36f68cf78..d1226090a 100644 --- a/sys/src/cmd/ip/ppp/ppp.c +++ b/sys/src/cmd/ip/ppp/ppp.c @@ -157,7 +157,7 @@ pppopen(PPP *ppp, int mediain, int mediaout, int shellin, char *net, char *dev, } } - ppp->mtu = Defmtu; + ppp->mtu = mtu; ppp->mru = mtu; ppp->framing = framing; ppp->net = net; @@ -294,7 +294,7 @@ pinit(PPP *ppp, Pstate *p) ppp->period = 0; p->optmask = 0xffffffff; if(!server) - p->optmask &= ~(Fauth|Fmtu); + p->optmask &= ~Fauth; ppp->rctlmap = 0; ppp->ipcp->state = Sclosed; ppp->ipcp->optmask = 0xffffffff; -- cgit v1.2.3