sctp: cleanup, no functional change intended

MFC after:	3 days
This commit is contained in:
Michael Tuexen 2022-05-14 08:30:41 +02:00
parent aab6e5bd1e
commit f210e4fbc5
3 changed files with 4 additions and 8 deletions

View File

@ -992,7 +992,7 @@ sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp SCTP_UNUSED,
if (stcb->sctp_socket) {
if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) ||
(stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) {
stcb->sctp_socket->so_snd.sb_cc = 0;
SCTP_SB_CLEAR(stcb->sctp_socket->so_snd);
}
sctp_ulp_notify(SCTP_NOTIFY_ASSOC_DOWN, stcb, 0, NULL, SCTP_SO_NOT_LOCKED);
}

View File

@ -846,18 +846,14 @@ sctp_flush(struct socket *so, int how)
inp->sctp_flags |= SCTP_PCB_FLAGS_SOCKET_CANT_READ;
SCTP_INP_READ_UNLOCK(inp);
SCTP_INP_WUNLOCK(inp);
so->so_rcv.sb_cc = 0;
so->so_rcv.sb_mbcnt = 0;
so->so_rcv.sb_mb = NULL;
SCTP_SB_CLEAR(so->so_rcv);
}
if ((how == PRU_FLUSH_WR) || (how == PRU_FLUSH_RDWR)) {
/*
* First make sure the sb will be happy, we don't use these
* except maybe the count
*/
so->so_snd.sb_cc = 0;
so->so_snd.sb_mbcnt = 0;
so->so_snd.sb_mb = NULL;
SCTP_SB_CLEAR(so->so_snd);
}
return (0);
}

View File

@ -5674,7 +5674,7 @@ restart_nosblocks:
#ifdef INVARIANTS
panic("Huh, its non zero and nothing on control?");
#endif
so->so_rcv.sb_cc = 0;
SCTP_SB_CLEAR(so->so_rcv);
}
SCTP_INP_READ_UNLOCK(inp);
hold_rlock = 0;