[Differential] D6148: tcp/syncache: Add comment for syncache_respond

Phabricator phabric-noreply at FreeBSD.org
Tue May 10 04:59:15 UTC 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rS299315: tcp/syncache: Add comment for syncache_respond (authored by sephe).

CHANGED PRIOR TO COMMIT
  https://reviews.freebsd.org/D6148?vs=15728&id=16100#toc

REPOSITORY
  rS FreeBSD src repository

CHANGES SINCE LAST UPDATE
  https://reviews.freebsd.org/D6148?vs=15728&id=16100

REVISION DETAIL
  https://reviews.freebsd.org/D6148

AFFECTED FILES
  head/sys/netinet/tcp_syncache.c

CHANGE DETAILS
  diff --git a/head/sys/netinet/tcp_syncache.c b/head/sys/netinet/tcp_syncache.c
  --- a/head/sys/netinet/tcp_syncache.c
  +++ b/head/sys/netinet/tcp_syncache.c
  @@ -1505,6 +1505,10 @@
   	return (rv);
   }
   
  +/*
  + * Send SYN|ACK to the peer.  Either in response to the peer's SYN,
  + * i.e. m0 != NULL, or upon 3WHS ACK timeout, i.e. m0 == NULL.
  + */
   static int
   syncache_respond(struct syncache *sc, struct syncache_head *sch, int locked,
       const struct mbuf *m0)
  @@ -1688,6 +1692,11 @@
   
   	M_SETFIB(m, sc->sc_inc.inc_fibnum);
   	m->m_pkthdr.csum_data = offsetof(struct tcphdr, th_sum);
  +	/*
  +	 * If we have peer's SYN and it has a flowid, then let's assign it to
  +	 * our SYN|ACK.  ip6_output() and ip_output() will not assign flowid
  +	 * to SYN|ACK due to lack of inp here.
  +	 */
   	if (m0 != NULL && M_HASHTYPE_GET(m0) != M_HASHTYPE_NONE) {
   		m->m_pkthdr.flowid = m0->m_pkthdr.flowid;
   		M_HASHTYPE_SET(m, M_HASHTYPE_GET(m0));

EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: sepherosa_gmail.com, network, transport, adrian, rwatson, gnn, lstewart, glebius, delphij, mike-karels.net, jtl, hiren, hselasky, sbruno
Cc: freebsd-net-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6148.16100.patch
Type: text/x-patch
Size: 924 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20160510/91875c4a/attachment.bin>


More information about the freebsd-net mailing list