diff options
author | Sepherosa Ziehau <sephe@FreeBSD.org> | 2016-05-10 04:59:04 +0000 |
---|---|---|
committer | Sepherosa Ziehau <sephe@FreeBSD.org> | 2016-05-10 04:59:04 +0000 |
commit | e6ec45f8690a0ee2d5062340adb33606e46db992 (patch) | |
tree | 99a9936780f4753c410542d8c927a0955661ad4c /sys/netinet/tcp_syncache.c | |
parent | 05992f9e2c906b39a165395c53d7cc3d46c93398 (diff) | |
download | src-e6ec45f8690a0ee2d5062340adb33606e46db992.tar.gz src-e6ec45f8690a0ee2d5062340adb33606e46db992.zip |
tcp/syncache: Add comment for syncache_respond
Suggested by: hiren, hps
Reviewed by: sbruno
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6148
Notes
Notes:
svn path=/head/; revision=299315
Diffstat (limited to 'sys/netinet/tcp_syncache.c')
-rw-r--r-- | sys/netinet/tcp_syncache.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index adb4cabbfe81..5bb18b0d8d35 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -1505,6 +1505,10 @@ tfo_done: 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 @@ syncache_respond(struct syncache *sc, struct syncache_head *sch, int locked, 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)); |