From nobody Thu Oct 31 14:03:04 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 4XfQgY0Phsz5bm2s; Thu, 31 Oct 2024 14:03:05 +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 4XfQgX6fBmz42v0; Thu, 31 Oct 2024 14:03:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730383384; 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=/+15qieJRqhv83gQdQ5pY4qY1bDazi0O9WImaF12enc=; b=vr12LxBQzWLKVTIK8jcZUNV+OK8chV+9mGpqYZTMCn5a1JXwQUx8HmIwI3dAGa3zBAonbo aPPET9fRFwqT4Q4gt0IKJsTpwCpQBm1yrzn0wvoKJ4Oh/w008EuELN7pz95opTJkb4uFxl JX4p+xXlmPJs5j3v+ytnf+gJfgTs7kVZwERSEjWhxgBYoWrYqnf7Zv5DHvzamO+jcqcMao 2bCVQVi8gAHIBgEc6Jbpab/P28Tg1U/iAGIhfb+1IW8mHVcB/1yFBKI2C1p0QulugiSmu1 zP2fXDRtzWXrg08JoPeMlr9iAZppLM7fBCnH23gk/chO5zEMSiXIRofHyCF3Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730383384; 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=/+15qieJRqhv83gQdQ5pY4qY1bDazi0O9WImaF12enc=; b=j9fqSsfOnDWPjhDEvbqKZ7BXZQ0YRY8pi41kHwIfwjE6h4vkREQYyfUXt0QxpcdbtMbEwA f8fkqSQehiDFjqY5tC4DrELu8UabeYlAIDnt4qmaiL++PxVqM/1DM+bPUCLP4sO3O+luZP OjCUKRZT85MyGHCm93Lb8VgqzArDNfOESnqmLoo5LYFf3sb86GDLQdjdOxTnfNb3eUQRin YhiUn2XvJ2+uudZIpvm/7nixWvhnldNGmr311h9ZnkGr4kCG8J8XaWFdXf1S6/yD8LHxST rn8DizR0foR4YYNuAmUlolu73S3nlIfhO7Q0JOhB1yxy1yKmSQgsCtPmLuORfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730383384; a=rsa-sha256; cv=none; b=yF3hci1W0NOFhiP5GiqneMy1QkfjIMEtTZrlbQFDST7eL2Q0vAXftL1TMxIyS5PwnLp2LD dmu3JWDSp0u6uArzp+QQh4QJ2GIoolkhlIe9EHYoF6QZpX4ODBkFdyYtcqwO4v1EjsIJ/W YMC7ikueL9+qW+s0TgEPJWIVEvGlQYdfrExp8r1n52g0Fhl6IB9QBEDo4WvrZu/SNIzXsK 2r8iZRQUMKHBDTB/bomlVY/HcPDmhjGhzDNL/vvo4hqCBvWBDo+n0FLK8YuomTyF95iB1/ TbR8QVfCtKcFjgDPNqZHTY1GJbx74f8qW6OFQSk3PDuzCqHdzZdaqwiZ2vDTLA== 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 4XfQgX6FD3zfhF; Thu, 31 Oct 2024 14:03:04 +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 49VE348R049206; Thu, 31 Oct 2024 14:03:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49VE34EC049203; Thu, 31 Oct 2024 14:03:04 GMT (envelope-from git) Date: Thu, 31 Oct 2024 14:03:04 GMT Message-Id: <202410311403.49VE34EC049203@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: 18a20a430691 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 18a20a43069193171c175c36077a1aae125f117c Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=18a20a43069193171c175c36077a1aae125f117c commit 18a20a43069193171c175c36077a1aae125f117c Author: Michael Tuexen AuthorDate: 2024-10-24 11:24:49 +0000 Commit: Michael Tuexen CommitDate: 2024-10-31 11:41:41 +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 d09b5062a512..f3d477e2a9a8 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 *