Set errno to ETIMEDOUT if an SCTP association times out during

setup.

MFC after: 1 week
This commit is contained in:
Michael Tuexen 2013-05-17 22:26:05 +00:00
parent 3c1c0edeef
commit 553bb0688c

View File

@ -2688,8 +2688,14 @@ set_error:
stcb->sctp_socket->so_error = ECONNRESET;
}
} else {
SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ECONNABORTED);
stcb->sctp_socket->so_error = ECONNABORTED;
if ((SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_COOKIE_WAIT) ||
(SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_COOKIE_ECHOED)) {
SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ETIMEDOUT);
stcb->sctp_socket->so_error = ETIMEDOUT;
} else {
SCTP_LTRACE_ERR_RET(NULL, stcb, NULL, SCTP_FROM_SCTPUTIL, ECONNABORTED);
stcb->sctp_socket->so_error = ECONNABORTED;
}
}
}
/* Wake ANY sleepers */