Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_timewait.c
Show First 20 Lines • Show All 640 Lines • ▼ Show 20 Lines | |||||
static void | static void | ||||
tcp_tw_2msl_stop(struct tcptw *tw, int reuse) | tcp_tw_2msl_stop(struct tcptw *tw, int reuse) | ||||
{ | { | ||||
INP_INFO_WLOCK_ASSERT(&V_tcbinfo); | INP_INFO_WLOCK_ASSERT(&V_tcbinfo); | ||||
TW_WLOCK(V_tw_lock); | TW_WLOCK(V_tw_lock); | ||||
TAILQ_REMOVE(&V_twq_2msl, tw, tw_2msl); | TAILQ_REMOVE(&V_twq_2msl, tw, tw_2msl); | ||||
/* | |||||
* I'm not sure yet why I'm seeing NULL pointers here. | |||||
* Is it possible that under high connection create/destroy | |||||
* and SO_REUSEPORT that we're creating timewait sessions | |||||
* without credentials? Or are we finding timewait | |||||
* sessions without credentials because they're being | |||||
* recycled? | |||||
*/ | |||||
if (tw->tw_cred) { | |||||
crfree(tw->tw_cred); | crfree(tw->tw_cred); | ||||
tw->tw_cred = NULL; | tw->tw_cred = NULL; | ||||
} | |||||
TW_WUNLOCK(V_tw_lock); | TW_WUNLOCK(V_tw_lock); | ||||
if (!reuse) | if (!reuse) | ||||
tw_pcbrele(tw); | tw_pcbrele(tw); | ||||
} | } | ||||
struct tcptw * | struct tcptw * | ||||
tcp_tw_2msl_reuse(void) | tcp_tw_2msl_reuse(void) | ||||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |