diff options
author | Michael Tuexen <tuexen@FreeBSD.org> | 2023-08-19 10:35:49 +0000 |
---|---|---|
committer | Michael Tuexen <tuexen@FreeBSD.org> | 2024-01-11 12:46:05 +0000 |
commit | 3ec4836e4a1bfcb1d740dddf20b3c7ec8676913c (patch) | |
tree | 04327274eeeee08a954a3195b6364a3ca2b9dfe4 /sys/netinet/sctp_pcb.c | |
parent | bb374dd2c10317ee18a50ff99d3474acb0be74a0 (diff) |
sctp: cleanup handling of graceful shutdown of the peer
Don't handle a graceful shutdown of the peer as an implicit signal
that all partial messages are complete. First, this is not implemented
correctly and second this should not be done by the peer. It is more
appropriate to handle this as a protocol violation.
Remove the incorrect code and leave detecting the protocol violation
and its handling in a followup commit.
(cherry picked from commit 4f14d4b6b7f0ca49b14379e48117121af3ed2669)
Diffstat (limited to 'sys/netinet/sctp_pcb.c')
-rw-r--r-- | sys/netinet/sctp_pcb.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 59686f9ff3f9..3435377e1064 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -3404,7 +3404,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from) continue; } if ((stcb->asoc.size_on_reasm_queue > 0) || - (stcb->asoc.control_pdapi) || (stcb->asoc.size_on_all_streams > 0) || ((so != NULL) && (SCTP_SBAVAIL(&so->so_rcv) > 0))) { /* Left with Data unread */ @@ -4761,18 +4760,10 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int from_inpcbfre * now. */ if (sq->end_added == 0) { - /* Held for PD-API clear that. */ + /* Held for PD-API, clear that. */ sq->pdapi_aborted = 1; sq->held_length = 0; if (sctp_stcb_is_feature_on(inp, stcb, SCTP_PCB_FLAGS_PDAPIEVNT) && (so != NULL)) { - /* - * Need to add a PD-API - * aborted indication. - * Setting the control_pdapi - * assures that it will be - * added right after this - * msg. - */ sctp_ulp_notify(SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION, stcb, SCTP_PARTIAL_DELIVERY_ABORTED, |