summaryrefslogtreecommitdiff
path: root/sys/src/9
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2022-09-18 13:31:56 +0000
committercinap_lenrek <cinap_lenrek@felloff.net>2022-09-18 13:31:56 +0000
commit13996f7f38601ab82bfe16c7dec0e2d618fe11b1 (patch)
tree578a0d8a7849c44d824878cfe1af8fbf9c89fbb5 /sys/src/9
parent373daa759c0548af932a49d1806eb6c937459e02 (diff)
tcpmssclamp: pass correct size tcpmssclamp()
The len variable refers to the total length of a Block list in ipoputX(), but we need to pass the size of the buffer we pass instead, which can be less if there are multiple blocks.
Diffstat (limited to 'sys/src/9')
-rw-r--r--sys/src/9/ip/ip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/9/ip/ip.c b/sys/src/9/ip/ip.c
index 89e6cf5a7..136ef1c66 100644
--- a/sys/src/9/ip/ip.c
+++ b/sys/src/9/ip/ip.c
@@ -136,7 +136,7 @@ ipoput4(Fs *f, Block *bp, int gating, int ttl, int tos, Routehint *rh)
medialen = ifc->maxtu - ifc->m->hsize;
if(gating)
- tcpmssclamp((uchar*)eh, len, medialen);
+ tcpmssclamp(bp->rp, BLEN(bp), medialen);
else {
eh->vihl = IP_VER4|IP_HLEN4;
eh->tos = tos;