mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
tcp: simplify fast open cookie processing
Consolidate various cookie checking and generation code to simplify the fast open processing. The main goal is to reduce code duplication in tcp_v4_conn_request() for IPv6 support. Removes two experimental sysctl flags TFO_SERVER_ALWAYS and TFO_SERVER_COOKIE_NOT_CHKD used primarily for developmental debugging purposes. Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Daniel Lee <longinus00@gmail.com> Signed-off-by: Jerry Chu <hkchu@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5b7ed0892f
commit
89278c9dc9
5 changed files with 33 additions and 64 deletions
|
@ -627,7 +627,7 @@ static unsigned int tcp_synack_options(struct sock *sk,
|
|||
if (unlikely(!ireq->tstamp_ok))
|
||||
remaining -= TCPOLEN_SACKPERM_ALIGNED;
|
||||
}
|
||||
if (foc != NULL) {
|
||||
if (foc != NULL && foc->len >= 0) {
|
||||
u32 need = TCPOLEN_EXP_FASTOPEN_BASE + foc->len;
|
||||
need = (need + 3) & ~3U; /* Align to 32 bits */
|
||||
if (remaining >= need) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue