summaryrefslogtreecommitdiffstats
path: root/contrib/diff/src
diff options
context:
space:
mode:
authorjtl <jtl@FreeBSD.org>2016-10-07 10:47:32 +0000
committerjtl <jtl@FreeBSD.org>2016-10-07 10:47:32 +0000
commit2232fe456599d891358a8321215551bd592b7c2b (patch)
tree4fd0b7b73c3cb9750fde1e7c0982c480a98b1aa9 /contrib/diff/src
parentaef94090ce0eb248a5b9494e293c0f28cd2d6122 (diff)
downloadFreeBSD-src-2232fe456599d891358a8321215551bd592b7c2b.zip
FreeBSD-src-2232fe456599d891358a8321215551bd592b7c2b.tar.gz
MFC r296454:
Some cleanup in tcp_respond() in preparation for another change: - Reorder variables by size - Move initializer closer to where it is used - Remove unneeded variable MFC r296455: As reported on the transport@ and current@ mailing lists, the FreeBSD TCP stack is not compliant with RFC 7323, which requires that TCP stacks send a timestamp option on all packets (except, optionally, RSTs) after the session is established. This patch adds that support. It also adds a TCP signature option to the packet, if appropriate. MFC r300764 (by jhb@): Don't reuse the source mbuf in tcp_respond() if it is not writable. 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 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 == NULL case), but the addresses and ports must be swapped in the reply (similar to the m != NULL case).
Diffstat (limited to 'contrib/diff/src')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud