Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 May 2016 00:14:28 +0000
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r300764 - head/sys/netinet
Message-ID:  <EF74E59A-8842-4BAE-90BE-EEE00F2745A5@FreeBSD.org>
In-Reply-To: <201605261835.u4QIZblp066704@repo.freebsd.org>
References:  <201605261835.u4QIZblp066704@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

> On 26 May 2016, at 18:35 , John Baldwin <jhb@FreeBSD.org> wrote:
>=20
> Author: jhb
> Date: Thu May 26 18:35:37 2016
> New Revision: 300764
> URL: https://svnweb.freebsd.org/changeset/base/300764
>=20
> Log:
>  Don't reuse the source mbuf in tcp_respond() if it is not writable.
>=20
>  Not all mbufs passed up from device drivers are M_WRITABLE().  In
>  particular, the Chelsio T4/T5 driver uses a feature called "buffer =
packing"
>  to receive multiple frames in a single receive buffer.  The mbufs for
>  these frames all share the same external storage so are treated as
>  read-only by the rest of the stack when multiple frames are in =
flight.
>  Previously tcp_respond() would blindly overwrite read-only mbufs when
>  INVARIANTS was disabled or panic with an assertion failure if =
INVARIANTS
>  was enabled.  Note that the new case is a bit of a mix of the two =
other
>  cases in tcp_respond().  The TCP and IP headers must be copied =
explicitly
>  into the new mbuf instead of being inherited (similar to the m =3D=3D =
NULL
>  case), but the addresses and ports must be swapped in the reply =
(similar
>  to the m !=3D NULL case).

Is the same true for ICMP(v6) replies?

/bz





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EF74E59A-8842-4BAE-90BE-EEE00F2745A5>