Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/tcp_syncache.c
Show First 20 Lines • Show All 504 Lines • ▼ Show 20 Lines | TAILQ_FOREACH_SAFE(sc, &sch->sch_bucket, sc_hash, nsc) { | ||||
* then the RST will be sent by the time the remote | * then the RST will be sent by the time the remote | ||||
* host does the SYN/ACK->ACK. | * host does the SYN/ACK->ACK. | ||||
*/ | */ | ||||
if (TSTMP_GT(sc->sc_rxttime, tick)) { | if (TSTMP_GT(sc->sc_rxttime, tick)) { | ||||
if (TSTMP_LT(sc->sc_rxttime, sch->sch_nextc)) | if (TSTMP_LT(sc->sc_rxttime, sch->sch_nextc)) | ||||
sch->sch_nextc = sc->sc_rxttime; | sch->sch_nextc = sc->sc_rxttime; | ||||
continue; | continue; | ||||
} | } | ||||
if (sc->sc_rxmits > V_tcp_ecn_maxretries) { | |||||
sc->sc_flags &= ~SCF_ECN; | |||||
} | |||||
if (sc->sc_rxmits > V_tcp_syncache.rexmt_limit) { | if (sc->sc_rxmits > V_tcp_syncache.rexmt_limit) { | ||||
if ((s = tcp_log_addrs(&sc->sc_inc, NULL, NULL, NULL))) { | if ((s = tcp_log_addrs(&sc->sc_inc, NULL, NULL, NULL))) { | ||||
log(LOG_DEBUG, "%s; %s: Retransmits exhausted, " | log(LOG_DEBUG, "%s; %s: Retransmits exhausted, " | ||||
"giving up and removing syncache entry\n", | "giving up and removing syncache entry\n", | ||||
s, __func__); | s, __func__); | ||||
free(s, M_TCPLOG); | free(s, M_TCPLOG); | ||||
} | } | ||||
syncache_drop(sc, sch); | syncache_drop(sc, sch); | ||||
▲ Show 20 Lines • Show All 979 Lines • ▼ Show 20 Lines | if (sc != NULL) { | ||||
} | } | ||||
/* | /* | ||||
* Update timestamp if present. | * Update timestamp if present. | ||||
*/ | */ | ||||
if ((sc->sc_flags & SCF_TIMESTAMP) && (to->to_flags & TOF_TS)) | if ((sc->sc_flags & SCF_TIMESTAMP) && (to->to_flags & TOF_TS)) | ||||
sc->sc_tsreflect = to->to_tsval; | sc->sc_tsreflect = to->to_tsval; | ||||
else | else | ||||
sc->sc_flags &= ~SCF_TIMESTAMP; | sc->sc_flags &= ~SCF_TIMESTAMP; | ||||
/* | |||||
* Disable ECN if needed. | |||||
*/ | |||||
if ((sc->sc_flags & SCF_ECN) && | |||||
((th->th_flags & (TH_ECE|TH_CWR)) != (TH_ECE|TH_CWR))) { | |||||
sc->sc_flags &= ~SCF_ECN; | |||||
} | |||||
#ifdef MAC | #ifdef MAC | ||||
/* | /* | ||||
* Since we have already unconditionally allocated label | * Since we have already unconditionally allocated label | ||||
* storage, free it up. The syncache entry will already | * storage, free it up. The syncache entry will already | ||||
* have an initialized label we can use. | * have an initialized label we can use. | ||||
*/ | */ | ||||
mac_syncache_destroy(&maclabel); | mac_syncache_destroy(&maclabel); | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 961 Lines • Show Last 20 Lines |