| 4323 | } |
| 4324 | |
| 4325 | void |
| 4326 | sctp_abort_notification(struct sctp_tcb *stcb, uint8_t from_peer, uint16_t error, |
| 4327 | struct sctp_abort_chunk *abort, int so_locked) |
| 4328 | { |
| 4329 | if (stcb == NULL) { |
| 4330 | return; |
| 4331 | } |
| 4332 | if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || |
| 4333 | ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) && |
| 4334 | (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_CONNECTED))) { |
| 4335 | stcb->sctp_ep->sctp_flags |= SCTP_PCB_FLAGS_WAS_ABORTED; |
| 4336 | } |
| 4337 | if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) || |
| 4338 | (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) || |
| 4339 | (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET)) { |
| 4340 | return; |
| 4341 | } |
| 4342 | SCTP_TCB_SEND_LOCK(stcb); |
| 4343 | SCTP_ADD_SUBSTATE(stcb, SCTP_STATE_WAS_ABORTED); |
| 4344 | /* Tell them we lost the asoc */ |
| 4345 | sctp_report_all_outbound(stcb, error, so_locked); |
| 4346 | SCTP_TCB_SEND_UNLOCK(stcb); |
| 4347 | if (from_peer) { |
| 4348 | sctp_ulp_notify(SCTP_NOTIFY_ASSOC_REM_ABORTED, stcb, error, abort, so_locked); |
| 4349 | } else { |
| 4350 | sctp_ulp_notify(SCTP_NOTIFY_ASSOC_LOC_ABORTED, stcb, error, abort, so_locked); |
| 4351 | } |
| 4352 | } |
| 4353 | |
| 4354 | void |
| 4355 | sctp_abort_association(struct sctp_inpcb *inp, struct sctp_tcb *stcb, |
no test coverage detected