From nobody Thu Oct 31 17:02:54 2024 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 4XfVg252hBz5c2SH; Thu, 31 Oct 2024 17:02:54 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XfVg24X6Kz4nhk; Thu, 31 Oct 2024 17:02:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730394174; 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=a3A9GcG/NWS8SP/01W6/paZEdI67fCS1lRQID5npRaQ=; b=QjJjV3k+Wa+QpcBxHPDPwk68cn3o24T0viM1Pehu1fzzze29d3byeT60+kEFwu4nMZypLE 9EvN6xN49N8pgKHr3Xkfwo7YNjbjze2/mjlPZqc0hcfCi6ZLA5xIsutMs8S2ZnrRFGK6+g 3fFaJsIGKYhtqvdZ7GsQHmlV1hlNx76rlrRVCGf85blfVK+t021NVGaUhA4TL4xZ63bXUC +m7BFffU7SWws+vIrYJeaw+8S0SrXb9EiWadteLQiz/ndXu4RNhrht63HWLkoAnY3jd1jC A+F+nbqanPMXZ+3hA95z0LrAivM7QfJ2rhnHqNGogJMEOTwK0/1zkPbBtP4yVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730394174; 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=a3A9GcG/NWS8SP/01W6/paZEdI67fCS1lRQID5npRaQ=; b=HXagZ51oULysfDYzvY93jL0Y0fzLXsHgm1fvu1SnoNEgb6a6UCsFyqp3VkTNAvU2//gRnC 5csIx4Wb056CmGentpjYTkARImhJnHf2GvES8KL+H3820Gi5zLRkVhZCzOHnfH7pp0+2li tOL7Ba0SGyVrdMh77Jly/x0QVvPSho07X52XCIEn5HLhyNNryi+SzD0SRaBL6eMOHCDsS5 E/PpiFIk8mbU0EntFUTuSffK06V0Cij5v5Zte0PrwJFa0i8AsRWHt1N4og2tZ1BmdzByp/ 6zsPNo7AYZkSELsNyY3tgZDwHAhySJ3PnNwDV0yOio8QcvtQsx7ee6Sw9IQv3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730394174; a=rsa-sha256; cv=none; b=kxij/+fCJqJybocYpSsOl/AIB6EkP6127jUXKPsnNs+dsneA17Qkuzt9OBbQPsDoFjvLUo W4Slizk24GEA8kCSSFVcwm6vlz41f9+DImDech3z/VCy8YTXN6i0mphyVeYZK/f9BI8bVs hJCcpOSS4TwEsDbll73jMMLdizMdCJKSoxWhqx66yoyQftCdry1aPnPf723DK4YiUsAYlj aWt9QvdEfOcThXf8aw6/l+X7e2e6SuL3H1yuP2VUQXHeSyyKpSzU/AWQL0VLc7J3R5HoGq +EJSFYWZq3TAXV2QlB3z/Siu/3zD4CWhyNMLhHmOfeNoivRHZUfynCTHzkJg2w== 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 4XfVg247TRzkYN; Thu, 31 Oct 2024 17:02:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49VH2sMv090455; Thu, 31 Oct 2024 17:02:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49VH2s2s090452; Thu, 31 Oct 2024 17:02:54 GMT (envelope-from git) Date: Thu, 31 Oct 2024 17:02:54 GMT Message-Id: <202410311702.49VH2s2s090452@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: 76c6a76ea1dd - stable/13 - sctp: cleanup 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 76c6a76ea1dd2f4cc47853c5b9f9ab41fd9a1017 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=76c6a76ea1dd2f4cc47853c5b9f9ab41fd9a1017 commit 76c6a76ea1dd2f4cc47853c5b9f9ab41fd9a1017 Author: Michael Tuexen AuthorDate: 2024-10-24 11:24:49 +0000 Commit: Michael Tuexen CommitDate: 2024-10-31 17:02:42 +0000 sctp: cleanup No functional change intended. (cherry picked from commit e4ac0183a1a846ef6556c9876dab76c06f5fea9c) --- sys/netinet/sctp_pcb.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 080cb81fa09a..cfac25c90891 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -192,21 +192,17 @@ sctp_find_ifn(void *ifn, uint32_t ifn_index) struct sctp_ifn *sctp_ifnp; struct sctp_ifnlist *hash_ifn_head; - /* - * We assume the lock is held for the addresses if that's wrong - * problems could occur :-) - */ SCTP_IPI_ADDR_LOCK_ASSERT(); hash_ifn_head = &SCTP_BASE_INFO(vrf_ifn_hash)[(ifn_index & SCTP_BASE_INFO(vrf_ifn_hashmark))]; LIST_FOREACH(sctp_ifnp, hash_ifn_head, next_bucket) { if (sctp_ifnp->ifn_index == ifn_index) { - return (sctp_ifnp); + break; } - if (sctp_ifnp->ifn_p && ifn && (sctp_ifnp->ifn_p == ifn)) { - return (sctp_ifnp); + if (ifn != NULL && sctp_ifnp->ifn_p == ifn) { + break; } } - return (NULL); + return (sctp_ifnp); } struct sctp_vrf *