summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/tcp.c
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1999-05-24 14:56:55 +0000
committerwpaul <wpaul@FreeBSD.org>1999-05-24 14:56:55 +0000
commit96fd7bde688afba4d5ecad71cff2b31f875067b3 (patch)
tree2d9e0f74a67d73ada93f3b6ba2ab6c305415e385 /usr.sbin/ppp/tcp.c
parent20a66934149b33e289e2e9824789dc3b85137ee4 (diff)
downloadFreeBSD-src-96fd7bde688afba4d5ecad71cff2b31f875067b3.zip
FreeBSD-src-96fd7bde688afba4d5ecad71cff2b31f875067b3.tar.gz
Fix bug that can cause transmit corruption. There are actually two 'rings'
in the transmit code: the TX descriptor ring, and a 'shadow' ring of mbuf pointers, one for each TX descriptor. When transmitting a packet that consists of several fragments in an mbuf chain, we link each fragment to a descriptor in the TX ring, but we only save a pointer to the mbuf chain. This pointer is saved in the shadow ring entry which corresponds to the first fragment in the packet. Later, ti_txeof() can release the whole chain with a single m_freem() call. (We need the second ring to keep track of the virtual addresses of the mbuf chains.) The problem with this is that the Tigon isn't actually through with the mbuf chain until it reaches the last fragment (which has the TI_BDFLAG_END bit set), however the current scheme releases the mbuf chain as soon as the first fragment is consumed. This is wrong, since the mbufs can then be yanked out from under the Tigon and modified before the other fragments can be transmitted. The fix is to make a one line change to ti_encap() so that it saves the mbuf chain pointer in the shadow ring entry that corresponds to the last fragment in TX ring instead of the first. This prevents the mbufs from being released until the last fragment is transmitted. Painstakingly diagnosed and fixed by: Robert Picco <picco@mail.wevinc.com> Brought to my attention by: dg
Diffstat (limited to 'usr.sbin/ppp/tcp.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud