Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/sctp6_usrreq.c
Show First 20 Lines • Show All 939 Lines • ▼ Show 20 Lines | #endif /* INET */ | ||||
if (stcb != NULL) { | if (stcb != NULL) { | ||||
/* Already have or am bring up an association */ | /* Already have or am bring up an association */ | ||||
SCTP_ASOC_CREATE_UNLOCK(inp); | SCTP_ASOC_CREATE_UNLOCK(inp); | ||||
SCTP_TCB_UNLOCK(stcb); | SCTP_TCB_UNLOCK(stcb); | ||||
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, EALREADY); | SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP6_USRREQ, EALREADY); | ||||
return (EALREADY); | return (EALREADY); | ||||
} | } | ||||
/* We are GOOD to go */ | /* We are GOOD to go */ | ||||
stcb = sctp_aloc_assoc(inp, addr, &error, 0, 0, vrf_id, | stcb = sctp_aloc_assoc_connected(inp, addr, &error, 0, 0, vrf_id, | ||||
inp->sctp_ep.pre_open_stream_count, | inp->sctp_ep.pre_open_stream_count, | ||||
inp->sctp_ep.port, p, | inp->sctp_ep.port, p, | ||||
SCTP_INITIALIZE_AUTH_PARAMS); | SCTP_INITIALIZE_AUTH_PARAMS); | ||||
SCTP_ASOC_CREATE_UNLOCK(inp); | SCTP_ASOC_CREATE_UNLOCK(inp); | ||||
if (stcb == NULL) { | if (stcb == NULL) { | ||||
/* Gak! no memory */ | /* Gak! no memory */ | ||||
return (error); | return (error); | ||||
} | |||||
if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) { | |||||
stcb->sctp_ep->sctp_flags |= SCTP_PCB_FLAGS_CONNECTED; | |||||
/* Set the connected flag so we can queue data */ | |||||
soisconnecting(so); | |||||
} | } | ||||
SCTP_SET_STATE(stcb, SCTP_STATE_COOKIE_WAIT); | SCTP_SET_STATE(stcb, SCTP_STATE_COOKIE_WAIT); | ||||
(void)SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_entered); | (void)SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_entered); | ||||
NET_EPOCH_ENTER(et); | NET_EPOCH_ENTER(et); | ||||
sctp_send_initiate(inp, stcb, SCTP_SO_LOCKED); | sctp_send_initiate(inp, stcb, SCTP_SO_LOCKED); | ||||
SCTP_TCB_UNLOCK(stcb); | SCTP_TCB_UNLOCK(stcb); | ||||
NET_EPOCH_EXIT(et); | NET_EPOCH_EXIT(et); | ||||
return (error); | return (error); | ||||
▲ Show 20 Lines • Show All 260 Lines • Show Last 20 Lines |