From 46926aa50246c1b68ac685ae8cb396de1d60e726 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Wed, 2 Sep 2015 01:50:55 +0200 Subject: 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! --- sys/src/9/ip/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.3