Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_syncache.c
Show First 20 Lines • Show All 1,952 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
if (sc->sc_tfo_cookie) { | if (sc->sc_tfo_cookie) { | ||||
to.to_flags |= TOF_FASTOPEN; | to.to_flags |= TOF_FASTOPEN; | ||||
to.to_tfo_len = TCP_FASTOPEN_COOKIE_LEN; | to.to_tfo_len = TCP_FASTOPEN_COOKIE_LEN; | ||||
to.to_tfo_cookie = sc->sc_tfo_cookie; | to.to_tfo_cookie = sc->sc_tfo_cookie; | ||||
/* don't send cookie again when retransmitting response */ | /* don't send cookie again when retransmitting response */ | ||||
sc->sc_tfo_cookie = NULL; | sc->sc_tfo_cookie = NULL; | ||||
} | } | ||||
if (V_tcp_ecn_option) | |||||
to.to_flags |= TOF_ACCE_SYN; | |||||
} | |||||
if (V_tcp_ecn_option && | |||||
(sc->sc_flags & SCF_ECN_MASK) && | |||||
((sc->sc_flags & SCF_ECN_MASK) != SCF_ECN)) { | |||||
to.to_flags |= TOF_ACCECNOPT; | |||||
to.to_flags |= TOF_ACCE_E0 | | |||||
TOF_ACCE_E1 | | |||||
TOF_ACCE_CE; | |||||
to.to_ee0b = 1; | |||||
to.to_ee1b = 1; | |||||
to.to_eceb = 0; | |||||
} | } | ||||
if (sc->sc_flags & SCF_TIMESTAMP) { | if (sc->sc_flags & SCF_TIMESTAMP) { | ||||
to.to_tsval = sc->sc_tsoff + tcp_ts_getticks(); | to.to_tsval = sc->sc_tsoff + tcp_ts_getticks(); | ||||
to.to_tsecr = sc->sc_tsreflect; | to.to_tsecr = sc->sc_tsreflect; | ||||
to.to_flags |= TOF_TS; | to.to_flags |= TOF_TS; | ||||
} | } | ||||
optlen = tcp_addoptions(&to, (u_char *)(th + 1)); | optlen = tcp_addoptions(&to, (u_char *)(th + 1)); | ||||
▲ Show 20 Lines • Show All 616 Lines • Show Last 20 Lines |