Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/tcp_syncache.c
Show First 20 Lines • Show All 1,662 Lines • ▼ Show 20 Lines | if (ltflags & TF_SIGNATURE) | ||||
sc->sc_flags |= SCF_SIGNATURE; | sc->sc_flags |= SCF_SIGNATURE; | ||||
#endif /* TCP_SIGNATURE */ | #endif /* TCP_SIGNATURE */ | ||||
if (to->to_flags & TOF_SACKPERM) | if (to->to_flags & TOF_SACKPERM) | ||||
sc->sc_flags |= SCF_SACK; | sc->sc_flags |= SCF_SACK; | ||||
if (to->to_flags & TOF_MSS) | if (to->to_flags & TOF_MSS) | ||||
sc->sc_peer_mss = to->to_mss; /* peer mss may be zero */ | sc->sc_peer_mss = to->to_mss; /* peer mss may be zero */ | ||||
if (ltflags & TF_NOOPT) | if (ltflags & TF_NOOPT) | ||||
sc->sc_flags |= SCF_NOOPT; | sc->sc_flags |= SCF_NOOPT; | ||||
if ((th->th_flags & (TH_ECE|TH_CWR)) && V_tcp_do_ecn) | if (((th->th_flags & (TH_ECE|TH_CWR)) == (TH_ECE|TH_CWR)) && | ||||
V_tcp_do_ecn) | |||||
sc->sc_flags |= SCF_ECN; | sc->sc_flags |= SCF_ECN; | ||||
if (V_tcp_syncookies) | if (V_tcp_syncookies) | ||||
sc->sc_iss = syncookie_generate(sch, sc); | sc->sc_iss = syncookie_generate(sch, sc); | ||||
else | else | ||||
sc->sc_iss = arc4random(); | sc->sc_iss = arc4random(); | ||||
#ifdef INET6 | #ifdef INET6 | ||||
if (autoflowlabel) { | if (autoflowlabel) { | ||||
▲ Show 20 Lines • Show All 793 Lines • Show Last 20 Lines |