From nobody Wed Feb 01 22:49:09 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4P6cY208dHz3cFld; Wed, 1 Feb 2023 22:49:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P6cY16l3lz4QFM; Wed, 1 Feb 2023 22:49:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675291749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UtHmG4vb7nm4sPIn7Z9mdLVvqU6XbI9bChRrZTBlFCg=; b=OUVFrp3R0t4VAn0VfSfbV2GhM3At9sRoWA4o9dYw9x92ZTjEdvmTLJMH/2lQe1EVJiSlf8 DV+OoJdAscVWCuEQQlD/oajnnU/gqTmnypcynWm9fusdp7iS9YB6X2qAhc18sLUxkOqaMc RINPWfXo4bYKEiiZq9aXzcCp8A7hFA2Vwk1qHeOrMhwknjn4h3f+fNNsiigBATdBjUrkTe 8YyxakqJBUU65oUFZD3AVhTijcF6lfGY0+UvxfIVztc/E1ABFmqdD92iJDxPmenwAejg8c 7ZtfHcF9gpHW3GcRZbVVDjAI4RGScAoojfTDkCTL3TOwRwkJ0UVQKtdmHm+jqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675291749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UtHmG4vb7nm4sPIn7Z9mdLVvqU6XbI9bChRrZTBlFCg=; b=RsKRfQz7saRRd+QWcoJ7XUX3SH0mkGDOn/go/i2By59ByCUQOijXGFJPJhsI3q/Zp8bW8d LapOsshPevciJFVq4nJUKw4R+SB/yFj+uLVGk7JaXyhMHFTkTEpX+UqmzUBIAfCON/emNK e1N1Ja9vKhaUL9QAMoWYcZoottYsVe2crBm07sGq2B72/1PoNyB2VPwarQFxV4lAPbvci5 V8Yb2Ovhj3c4WlEL/nL25hgJSdX3VIXQaIQvowI+Bh0EabMyYFBcSv80t7rwIsfBgGvjbu BkshLqjebByl8p3ZA65kLXY5/YDSnvUAjOweobeWi4sB776rDQrSxusZL6jkhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675291749; a=rsa-sha256; cv=none; b=e21LzgLOK6/LG92hN0+CqxLNvTNZ6cjzPwI8QbUwf0cWaoDPIG4j1GqkmdvZXzwreg5Xot UBDh0XndU5T/Y19IST/nfjAEK92gYcrDfGyIIDExkD9jHW5GzvHxkEbBGDecwtuduM3nnr JoQETSre8CzaHYuNkAD0U9c1qj+ADTGlmrz/5VI7IhadE1zItPKKNTiWsEfcfqU8aSYH58 JFSVmjXz/q/GCtrN1UMW5b7axGUijpD63fWYgP0+C3xHzMaIZ7ztFE342qI3A2MFvlpl5L ztPA3bxDcCesoPhMDuDW4eOlBNljqKhri/tMzroGuXrmTm70K6dRjirfs8xOkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4P6cY15nTBzX91; Wed, 1 Feb 2023 22:49:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 311Mn993003886; Wed, 1 Feb 2023 22:49:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 311Mn9WT003885; Wed, 1 Feb 2023 22:49:09 GMT (envelope-from git) Date: Wed, 1 Feb 2023 22:49:09 GMT Message-Id: <202302012249.311Mn9WT003885@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 33b2501870c7 - stable/13 - sctp: cleanup, no functional change intended List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 33b2501870c7f508b8619850cde575d0a248d42a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=33b2501870c7f508b8619850cde575d0a248d42a commit 33b2501870c7f508b8619850cde575d0a248d42a Author: Michael Tuexen AuthorDate: 2022-05-14 06:30:41 +0000 Commit: Michael Tuexen 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;