git: 33b2501870c7 - stable/13 - sctp: cleanup, no functional change intended
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 01 Feb 2023 22:49:09 UTC
The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=33b2501870c7f508b8619850cde575d0a248d42a commit 33b2501870c7f508b8619850cde575d0a248d42a Author: Michael Tuexen <tuexen@FreeBSD.org> AuthorDate: 2022-05-14 06:30:41 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> CommitDate: 2023-02-01 22:48:46 +0000 sctp: cleanup, no functional change intended (cherry picked from commit f210e4fbc54ab78711bd5197b7097002ff3ae891) --- sys/netinet/sctp_input.c | 2 +- sys/netinet/sctp_usrreq.c | 8 ++------ sys/netinet/sctputil.c | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 6c9720a974ad..95e3be69123e 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -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); } diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c index 0a7d28d978f0..b6eae2b061d6 100644 --- a/sys/netinet/sctp_usrreq.c +++ b/sys/netinet/sctp_usrreq.c @@ -844,18 +844,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); } diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index f2065beb2bb2..23631e5a20d5 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -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;