]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r296454:
authorjtl <jtl@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 7 Oct 2016 10:47:32 +0000 (10:47 +0000)
committerjtl <jtl@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 7 Oct 2016 10:47:32 +0000 (10:47 +0000)
commitac472d77e4291d1bf5dba9280d84c27cad5606a8
tree4fd0b7b73c3cb9750fde1e7c0982c480a98b1aa9
parent27e9a654507ef3d7d144555f3afbbfaa398ee86d
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).

git-svn-id: svn://svn.freebsd.org/base/stable/10@306802 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/netinet/tcp_subr.c