Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_syncache.c
Show First 20 Lines • Show All 1,225 Lines • ▼ Show 20 Lines | if (!(sc->sc_flags & SCF_TIMESTAMP) && | ||||
free(s, M_TCPLOG); | free(s, M_TCPLOG); | ||||
s = NULL; | s = NULL; | ||||
} | } | ||||
} | } | ||||
/* | /* | ||||
* If timestamps were negotiated during SYN/ACK and a | * If timestamps were negotiated during SYN/ACK and a | ||||
* segment without a timestamp is received, silently drop | * segment without a timestamp is received, silently drop | ||||
* the segment. | * the segment, unless the missing timestamps are tolerated. | ||||
* See section 3.2 of RFC 7323. | * See section 3.2 of RFC 7323. | ||||
*/ | */ | ||||
if ((sc->sc_flags & SCF_TIMESTAMP) && | if ((sc->sc_flags & SCF_TIMESTAMP) && | ||||
!(to->to_flags & TOF_TS)) { | !(to->to_flags & TOF_TS)) { | ||||
if (V_tcp_tolerate_missing_ts) { | |||||
if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { | |||||
log(LOG_DEBUG, | |||||
"%s; %s: Timestamp missing, " | |||||
"segment processed normally\n", | |||||
s, __func__); | |||||
free(s, M_TCPLOG); | |||||
} | |||||
} else { | |||||
SCH_UNLOCK(sch); | SCH_UNLOCK(sch); | ||||
if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { | if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { | ||||
log(LOG_DEBUG, "%s; %s: Timestamp missing, " | log(LOG_DEBUG, | ||||
"segment silently dropped\n", s, __func__); | "%s; %s: Timestamp missing, " | ||||
"segment silently dropped\n", | |||||
s, __func__); | |||||
free(s, M_TCPLOG); | free(s, M_TCPLOG); | ||||
} | } | ||||
return (-1); /* Do not send RST */ | return (-1); /* Do not send RST */ | ||||
} | |||||
} | } | ||||
/* | /* | ||||
* Pull out the entry to unlock the bucket row. | * Pull out the entry to unlock the bucket row. | ||||
* | * | ||||
* NOTE: We must decrease TCPS_SYN_RECEIVED count here, not | * NOTE: We must decrease TCPS_SYN_RECEIVED count here, not | ||||
* tcp_state_change(). The tcpcb is not existent at this | * tcp_state_change(). The tcpcb is not existent at this | ||||
* moment. A new one will be allocated via syncache_socket-> | * moment. A new one will be allocated via syncache_socket-> | ||||
▲ Show 20 Lines • Show All 1,255 Lines • Show Last 20 Lines |