diff options
author | bz <bz@FreeBSD.org> | 2008-11-06 13:25:59 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2008-11-06 13:25:59 +0000 |
commit | 78d9aa925e115d46e8408476c46d172dc9d28680 (patch) | |
tree | 487bf156bdb934ed2a4387c9c02646258633623d /sys/netinet/tcp_subr.c | |
parent | a60ac642fc023a13947e5872ad87b2cb14349d1e (diff) | |
download | FreeBSD-src-78d9aa925e115d46e8408476c46d172dc9d28680.zip FreeBSD-src-78d9aa925e115d46e8408476c46d172dc9d28680.tar.gz |
Fix a bug introduced with r182851 splitting tcp_mss() into
tcp_mss() and tcp_mss_update() so that tcp_mtudisc() could
re-use the same code.
Move the TSO logic back to tcp_mss() and out of tcp_mss_update().
We tried to avoid that initially but if were are called from
tcp_output() with EMSGSIZE, we cleared the TSO flag on the tcpcb
there, called into tcp_mtudisc() and tcp_mss_update() which
then would reenable TSO on the tcpcb based on TSO capabilities
of the interface as learnt in tcp_maxmtu/6().
So if TSO was enabled on the (possibly new) outgoing interface
it was turned back on, which lead to an endless loop between
tcp_output() and tcp_mtudisc() until we overflew the stack.
Reported by: kmacy
MFC after: 2 months (along with r182851)
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r-- | sys/netinet/tcp_subr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 51848ee..02d654b 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1562,7 +1562,7 @@ tcp_mtudisc(struct inpcb *inp, int errno) tp = intotcpcb(inp); KASSERT(tp != NULL, ("tcp_mtudisc: tp == NULL")); - tcp_mss_update(tp, -1, NULL); + tcp_mss_update(tp, -1, NULL, NULL); so = inp->inp_socket; SOCKBUF_LOCK(&so->so_snd); |