diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-09-02 01:50:55 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-09-02 01:50:55 +0200 |
commit | 46926aa50246c1b68ac685ae8cb396de1d60e726 (patch) | |
tree | 553bb2a5fc765cc44373ddfb81e9487073c49379 /sys/src/9 | |
parent | b5737e87262b69fbfd5750a9485de9fc8b5b06dd (diff) |
tcp: fix mtu on server sockets again (thans mycroftix)
for incoming connection, we used s->laddr to lookup the interface
for the incoming call, but this does not work when the announce
address is tcp!*!123, then s->laddr is all zeros "::". instead,
use the incoming destination address for interface mtu lookup.
thanks mycroftix for troubleshooting!
Diffstat (limited to 'sys/src/9')
-rw-r--r-- | sys/src/9/ip/tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/9/ip/tcp.c b/sys/src/9/ip/tcp.c index 5be66032e..f19391a68 100644 --- a/sys/src/9/ip/tcp.c +++ b/sys/src/9/ip/tcp.c @@ -1771,7 +1771,7 @@ tcpincoming(Conv *s, Tcp *segp, uchar *src, uchar *dst, uchar version) tcb->flags |= SYNACK; /* set desired mss and scale */ - tcb->mss = tcpmtu(s->p, s->laddr, s->ipversion, &tcb->scale); + tcb->mss = tcpmtu(s->p, dst, s->ipversion, &tcb->scale); /* our sending max segment size cannot be bigger than what he asked for */ if(lp->mss != 0 && lp->mss < tcb->mss) |