MCPcopy Create free account
hub / github.com/F-Stack/f-stack / syncache_tfo_expand

Function syncache_tfo_expand

freebsd/netinet/tcp_syncache.c:1397–1423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1395}
1396
1397static void
1398syncache_tfo_expand(struct syncache *sc, struct socket **lsop, struct mbuf *m,
1399 uint64_t response_cookie)
1400{
1401 struct inpcb *inp;
1402 struct tcpcb *tp;
1403 unsigned int *pending_counter;
1404
1405 NET_EPOCH_ASSERT();
1406
1407 pending_counter = intotcpcb(sotoinpcb(*lsop))->t_tfo_pending;
1408 *lsop = syncache_socket(sc, *lsop, m);
1409 if (*lsop == NULL) {
1410 TCPSTAT_INC(tcps_sc_aborted);
1411 atomic_subtract_int(pending_counter, 1);
1412 } else {
1413 soisconnected(*lsop);
1414 inp = sotoinpcb(*lsop);
1415 tp = intotcpcb(inp);
1416 tp->t_flags |= TF_FASTOPEN;
1417 tp->t_tfo_cookie.server = response_cookie;
1418 tp->snd_max = tp->iss;
1419 tp->snd_nxt = tp->iss;
1420 tp->t_tfo_pending = pending_counter;
1421 TCPSTAT_INC(tcps_sc_completed);
1422 }
1423}
1424
1425/*
1426 * Given a LISTEN socket and an inbound SYN request, add

Callers 1

syncache_addFunction · 0.85

Calls 1

soisconnectedFunction · 0.85

Tested by

no test coverage detected