From nobody Fri Oct 25 14:29:08 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 4XZlXN5NbJz5ZmCQ; Fri, 25 Oct 2024 14:29:08 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XZlXN4cX0z4PbK; Fri, 25 Oct 2024 14:29:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729866548; 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=aJbuP+LeiMCNtvWbo8f5qtQ/g8xWYXQQF+dgxNrlaas=; b=qdOSWzIy3IfU3/5S5xhscDFOBBxPFtkI69A1ouE8PDxe2qrocmB3mmQsQwj7uwFf8TM6CY 3oTathQ/TwoT5Cud5plWOLCuCvpUOBNgSJyPs/obSn4UsxTuKbatnwDhrXZBjOgdIyUnSe o0ensnFnQJ2bcQPiuDICoq5zRRF04+xNdnrk3LRUH3AgdQ/wyx1r8/nxJvmuPmEZG8XCdK LPNM0PTMroKhJNGtMsiUqCEzQvgL1rBbE8d8BshFwb0oqIklYjHtM4niV1A3lz5YzqceHk 9416jfCE9Hd+9FvGHcxNV3ngR9iDFyIByBsUrtNy0p4gpP5uttGR0xnxnG+M9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729866548; 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=aJbuP+LeiMCNtvWbo8f5qtQ/g8xWYXQQF+dgxNrlaas=; b=gk8FwIAN7ZKQcaSfjAdxpmSI1CXMKaVtkqiEShxvV6p150Zrb2sHTfQjuSger7fdkYmeXF 9hhTdowpfPydMjjkBHHa2zg3jv2Zvfw7X5u1l4ILTAtbFj9qkO4KmZT7hpZ3Ow2iaJyf0i Whr74+n/+7Iqtnb4qZmCfxA2jTeNKkOBIV7PlpZBoxyVOrNmAGCwF09Gi9manw8tjzhANs iKOmd5xVGZXGgE0Y8jYi49msr1qIoZz46OG384yaZLJkLjldW9VrDf96atyquxGxnhLt4h 880+2KBr8X44Xqbxm+dCXy0O/5pXRbZHX7msSf3rDOE2q9piJdi5Lz2quSNFJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729866548; a=rsa-sha256; cv=none; b=QXkeI5JJytBRyDBF4+ifC3g2cN8xFy6glLqKjpQy42jDgOssUwHdIDRY+1roph/BcUBr3Q 70elebp9sFjM4d47mlA8GeATsjbYsQLoTST2jTvqhgh0kdL52q90/map9+Vc6H4axO6v4L KxWqS/nbZ2J13PHkmya6mMuGyl33g2fwfuE76MCt+h/m0iIpX9hksgPzPsyRElI/qONpv7 VJjv+HF39N8Rai1jjr/R9coVOvty0J2hwVc759O/UXHbQPTSvH50nLHDJgjWq7kWCWHtCD gl+sls4MFCKOUzahaW3zCfpdJF63qaF0e7/1eOrU4nAE9d64Nlu/kA/L2RYx6w== 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 4XZlXN4CnHzT2F; Fri, 25 Oct 2024 14:29:08 +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 49PET8ck036146; Fri, 25 Oct 2024 14:29:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49PET8lx036141; Fri, 25 Oct 2024 14:29:08 GMT (envelope-from git) Date: Fri, 25 Oct 2024 14:29:08 GMT Message-Id: <202410251429.49PET8lx036141@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 02478e65910a - main - sctp: further 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/main X-Git-Reftype: branch X-Git-Commit: 02478e65910ab1ef53511ebb2271cdcf0e9a14cf Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=02478e65910ab1ef53511ebb2271cdcf0e9a14cf commit 02478e65910ab1ef53511ebb2271cdcf0e9a14cf Author: Michael Tuexen AuthorDate: 2024-10-25 11:47:43 +0000 Commit: Michael Tuexen CommitDate: 2024-10-25 11:47:43 +0000 sctp: further cleanup MFC after: 3 days --- sys/netinet/sctp_pcb.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 3b59a72e1f1a..112242a0e7e3 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -455,7 +455,6 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint32_t ifn_index, struct sctp_ifalist *hash_addr_head; struct sctp_ifnlist *hash_ifn_head; uint32_t hash_of_addr; - int new_ifn_af = 0; #ifdef SCTP_DEBUG SCTPDBG(SCTP_DEBUG_PCB4, "vrf_id 0x%x: adding address: ", vrf_id); @@ -519,7 +518,6 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint32_t ifn_index, LIST_INSERT_HEAD(hash_ifn_head, sctp_ifnp, next_bucket); LIST_INSERT_HEAD(&vrf->ifnlist, sctp_ifnp, next_ifn); atomic_add_int(&SCTP_BASE_INFO(ipi_count_ifns), 1); - new_ifn_af = 1; } sctp_ifap = sctp_find_ifa_by_addr(addr, vrf->vrf_id, SCTP_ADDR_LOCKED); if (sctp_ifap) { @@ -529,7 +527,7 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint32_t ifn_index, SCTPDBG(SCTP_DEBUG_PCB4, "Using existing ifn %s (0x%x) for ifa %p\n", sctp_ifap->ifn_p->ifn_name, ifn_index, (void *)sctp_ifap); - if (new_ifn_af) { + if (new_sctp_ifnp == NULL) { /* Remove the created one that we don't want */ sctp_delete_ifn(sctp_ifnp); } @@ -597,8 +595,8 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint32_t ifn_index, sctp_ifap->src_is_priv = 1; } sctp_ifnp->num_v4++; - if (new_ifn_af) - new_ifn_af = AF_INET; + if (new_sctp_ifnp == NULL) + sctp_ifnp->registered_af = AF_INET; break; } #endif @@ -617,13 +615,12 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint32_t ifn_index, sctp_ifap->src_is_priv = 1; } sctp_ifnp->num_v6++; - if (new_ifn_af) - new_ifn_af = AF_INET6; + if (new_sctp_ifnp == NULL) + sctp_ifnp->registered_af = AF_INET6; break; } #endif default: - new_ifn_af = 0; break; } hash_of_addr = sctp_get_ifa_hash_val(&sctp_ifap->address.sa); @@ -639,9 +636,6 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint32_t ifn_index, sctp_ifnp->ifa_count++; vrf->total_ifa_count++; atomic_add_int(&SCTP_BASE_INFO(ipi_count_ifas), 1); - if (new_ifn_af) { - sctp_ifnp->registered_af = new_ifn_af; - } SCTP_IPI_ADDR_WUNLOCK(); if (new_sctp_ifnp != NULL) { SCTP_FREE(new_sctp_ifnp, SCTP_M_IFN);