Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netinet/sctp_input.c
Show First 20 Lines • Show All 5,194 Lines • ▼ Show 20 Lines | case SCTP_COOKIE_ECHO: | ||||
} | } | ||||
} | } | ||||
/* | /* | ||||
* First are we accepting? We do this again here | * First are we accepting? We do this again here | ||||
* since it is possible that a previous endpoint WAS | * since it is possible that a previous endpoint WAS | ||||
* listening responded to a INIT-ACK and then | * listening responded to a INIT-ACK and then | ||||
* closed. We opened and bound.. and are now no | * closed. We opened and bound.. and are now no | ||||
* longer listening. | * longer listening. | ||||
* | |||||
* XXXGL: notes on checking listen queue length. | |||||
* 1) SCTP_IS_LISTENING() doesn't necessarily mean | |||||
* SOLISTENING(), because a listening "UDP type" | |||||
* socket isn't listening in terms of the socket | |||||
* layer. It is a normal data flow socket, that | |||||
* can fork off new connections. Thus, we should | |||||
* look into sol_qlen only in case we are !UDP. | |||||
* 2) Checking sol_qlen in general requires locking | |||||
* the socket, and this code lacks that. | |||||
*/ | */ | ||||
if ((stcb == NULL) && | if ((stcb == NULL) && | ||||
(!SCTP_IS_LISTENING(inp) || | (!SCTP_IS_LISTENING(inp) || | ||||
inp->sctp_socket->so_qlen >= inp->sctp_socket->so_qlimit)) { | (!(inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && | ||||
inp->sctp_socket->sol_qlen >= inp->sctp_socket->sol_qlimit))) { | |||||
if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) && | if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) && | ||||
(SCTP_BASE_SYSCTL(sctp_abort_if_one_2_one_hits_limit))) { | (SCTP_BASE_SYSCTL(sctp_abort_if_one_2_one_hits_limit))) { | ||||
op_err = sctp_generate_cause(SCTP_CAUSE_OUT_OF_RESC, ""); | op_err = sctp_generate_cause(SCTP_CAUSE_OUT_OF_RESC, ""); | ||||
sctp_abort_association(inp, stcb, m, iphlen, | sctp_abort_association(inp, stcb, m, iphlen, | ||||
src, dst, sh, op_err, | src, dst, sh, op_err, | ||||
mflowtype, mflowid, | mflowtype, mflowid, | ||||
vrf_id, port); | vrf_id, port); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 993 Lines • Show Last 20 Lines |