summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2023-05-21 22:21:08 +0000
committercinap_lenrek <cinap_lenrek@felloff.net>2023-05-21 22:21:08 +0000
commit278caaf11931ec0c71fc13fd4c4794fae325c404 (patch)
tree19d7fb53dbb3b255e5b5f80671fa79d3f45ecbf8
parenta65ab6daec833827ff991cbc1eee2a70fa3e4efb (diff)
ip/ppp: just use mtu requested from the peer.HEADfront
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).
-rw-r--r--sys/src/cmd/ip/ppp/ppp.c4
1 files 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;