From nobody Wed Nov 06 12:33:42 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 4Xk4Pg06Tvz5cXMM; Wed, 06 Nov 2024 12:33:43 +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 4Xk4Pf6fG0z3xCb; Wed, 6 Nov 2024 12:33:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730896422; 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=Z89m44Lh1Ek5RGnGk5/xLCCxc9Kfvvuk8b7IPitve5Y=; b=sDPB4mWHe05uLpVgflFpaqOT5+xpeTBxenn2VUXDeArqYQc6LwQMV6+d4F/3Y5UUKeXqu2 Vtz2lHe7xmW9fGQJSE3LQTMKDW5PUbnsBVktQBWYDDa89t7HRvMaSs5laK0EGKBKw56eeL mDNbh1Oa+UtMPCh15giTlNrFFFwpYxbtdrlpzgWoh2M8yX2UIW5M0Ik2f0wpn8Sll4Ecgj kEMVJaezTAPbWSSzWhY8ZD+KrgrBJ0m6pxMmuMkDGzsrDq6QHHfacVXPr4ig9kXVhAebu3 1uLrpSDLls0MLgKMkqXrXEVFg9Ic+sPZh7efGlvxlaalZ3PZxlGkGdoklUf/SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730896422; 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=Z89m44Lh1Ek5RGnGk5/xLCCxc9Kfvvuk8b7IPitve5Y=; b=r3TFxZ9C6c+WvOBpEGX/vqeu1Ke7MzC1LG77v3Cd0J/ryakjfBxmzjHoyyZ0iypedEb5dX fzl1zysZwAX2DLJMVwqGLNOH2eGZZG9Syn8/+3WYZy27TouyITcVbH6R+TYdwnHbc1Is5u X3DH8nwuClnlgjoSMZsQZ7VMns5jnxE/745SYlJ4DOWAvLWGK0s2OPWRynHtbp2OXfGHfq Ca8cQEzzOOYAj2lBWBYRkhpFk7Q+GJTA1qVYFs+7vagFihvwA+s/2xNpX6vGvjTbTADKMc DkLHuqYyU/5wzwFqcZrQVS2FdoPbWI5K9BuKfpGwPLVamAOl0Gx/MEmf5xEcug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730896422; a=rsa-sha256; cv=none; b=qGzXpw6E6cXtUdVo455m1B/n6qD7dUtVla/iNM0/i4UiBkULvpbTM7rbZqM1samGpr6UL1 tjNeCdHaV8mFNLmtMrxRI8SW/byk+GKDvq1lRuwNK2kbP4ZQvqwQ/gAzdO3opcngwJUTIs dFKfpKrMO5XCHzbCAiTWUOHEnherSeOfYMPPuJJ7OFG3RM2VdwgQuRYCySIX68ij1Usgna BPW5yBYRyw7lkpf5rVJeT1lWkv6YMwGS9cTVqTfIL/tyGrQVtRg8zYLKDY/esCQjkI40cc 3mS5+tp/yTjlfS8IOpa00zODctBa2em2tD1vuVKsoAjVmzVUhHty4zLO0RHI2A== 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 4Xk4Pf685kz11TX; Wed, 6 Nov 2024 12:33:42 +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 4A6CXg4c043080; Wed, 6 Nov 2024 12:33:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4A6CXgPC043077; Wed, 6 Nov 2024 12:33:42 GMT (envelope-from git) Date: Wed, 6 Nov 2024 12:33:42 GMT Message-Id: <202411061233.4A6CXgPC043077@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: e3f26ce52b71 - stable/13 - sctp: garbage collect two unused functions 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: e3f26ce52b71d4005e666ced22c0855dbc70b28e Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e3f26ce52b71d4005e666ced22c0855dbc70b28e commit e3f26ce52b71d4005e666ced22c0855dbc70b28e Author: Michael Tuexen AuthorDate: 2024-11-02 16:58:09 +0000 Commit: Michael Tuexen CommitDate: 2024-11-06 12:33:13 +0000 sctp: garbage collect two unused functions (cherry picked from commit 470a63cde4285ea4a317b0bba966514c11f4ed5b) --- sys/netinet/sctp_pcb.c | 84 -------------------------------------------------- sys/netinet/sctp_pcb.h | 12 -------- 2 files changed, 96 deletions(-) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 1196dca8f8d4..469c401978ac 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -276,90 +276,6 @@ sctp_delete_ifn(struct sctp_ifn *sctp_ifnp) sctp_free_ifn(sctp_ifnp); } -void -sctp_mark_ifa_addr_down(uint32_t vrf_id, struct sockaddr *addr, - const char *if_name, uint32_t ifn_index) -{ - struct sctp_vrf *vrf; - struct sctp_ifa *sctp_ifap; - - SCTP_IPI_ADDR_RLOCK(); - vrf = sctp_find_vrf(vrf_id); - if (vrf == NULL) { - SCTPDBG(SCTP_DEBUG_PCB4, "Can't find vrf_id 0x%x\n", vrf_id); - goto out; - } - sctp_ifap = sctp_find_ifa_by_addr(addr, vrf->vrf_id, SCTP_ADDR_LOCKED); - if (sctp_ifap == NULL) { - SCTPDBG(SCTP_DEBUG_PCB4, "Can't find sctp_ifap for address\n"); - goto out; - } - if (sctp_ifap->ifn_p == NULL) { - SCTPDBG(SCTP_DEBUG_PCB4, "IFA has no IFN - can't mark unusable\n"); - goto out; - } - if (if_name) { - if (strncmp(if_name, sctp_ifap->ifn_p->ifn_name, SCTP_IFNAMSIZ) != 0) { - SCTPDBG(SCTP_DEBUG_PCB4, "IFN %s of IFA not the same as %s\n", - sctp_ifap->ifn_p->ifn_name, if_name); - goto out; - } - } else { - if (sctp_ifap->ifn_p->ifn_index != ifn_index) { - SCTPDBG(SCTP_DEBUG_PCB4, "IFA owned by ifn_index:%d down command for ifn_index:%d - ignored\n", - sctp_ifap->ifn_p->ifn_index, ifn_index); - goto out; - } - } - - sctp_ifap->localifa_flags &= ~SCTP_ADDR_VALID; - sctp_ifap->localifa_flags |= SCTP_ADDR_IFA_UNUSEABLE; -out: - SCTP_IPI_ADDR_RUNLOCK(); -} - -void -sctp_mark_ifa_addr_up(uint32_t vrf_id, struct sockaddr *addr, - const char *if_name, uint32_t ifn_index) -{ - struct sctp_vrf *vrf; - struct sctp_ifa *sctp_ifap; - - SCTP_IPI_ADDR_RLOCK(); - vrf = sctp_find_vrf(vrf_id); - if (vrf == NULL) { - SCTPDBG(SCTP_DEBUG_PCB4, "Can't find vrf_id 0x%x\n", vrf_id); - goto out; - } - sctp_ifap = sctp_find_ifa_by_addr(addr, vrf->vrf_id, SCTP_ADDR_LOCKED); - if (sctp_ifap == NULL) { - SCTPDBG(SCTP_DEBUG_PCB4, "Can't find sctp_ifap for address\n"); - goto out; - } - if (sctp_ifap->ifn_p == NULL) { - SCTPDBG(SCTP_DEBUG_PCB4, "IFA has no IFN - can't mark unusable\n"); - goto out; - } - if (if_name) { - if (strncmp(if_name, sctp_ifap->ifn_p->ifn_name, SCTP_IFNAMSIZ) != 0) { - SCTPDBG(SCTP_DEBUG_PCB4, "IFN %s of IFA not the same as %s\n", - sctp_ifap->ifn_p->ifn_name, if_name); - goto out; - } - } else { - if (sctp_ifap->ifn_p->ifn_index != ifn_index) { - SCTPDBG(SCTP_DEBUG_PCB4, "IFA owned by ifn_index:%d down command for ifn_index:%d - ignored\n", - sctp_ifap->ifn_p->ifn_index, ifn_index); - goto out; - } - } - - sctp_ifap->localifa_flags &= ~SCTP_ADDR_IFA_UNUSEABLE; - sctp_ifap->localifa_flags |= SCTP_ADDR_VALID; -out: - SCTP_IPI_ADDR_RUNLOCK(); -} - /*- * Add an ifa to an ifn. * Register the interface as necessary. diff --git a/sys/netinet/sctp_pcb.h b/sys/netinet/sctp_pcb.h index 9dbaf5fcde71..7ef6feee9c01 100644 --- a/sys/netinet/sctp_pcb.h +++ b/sys/netinet/sctp_pcb.h @@ -486,18 +486,6 @@ struct sctp_vrf *sctp_allocate_vrf(int vrfid); struct sctp_vrf *sctp_find_vrf(uint32_t vrfid); void sctp_free_vrf(struct sctp_vrf *vrf); -/*- - * Change address state, can be used if - * O/S supports telling transports about - * changes to IFA/IFN's (link layer triggers). - * If a ifn goes down, we will do src-addr-selection - * and NOT use that, as a source address. This does - * not stop the routing system from routing out - * that interface, but we won't put it as a source. - */ -void sctp_mark_ifa_addr_down(uint32_t vrf_id, struct sockaddr *addr, const char *if_name, uint32_t ifn_index); -void sctp_mark_ifa_addr_up(uint32_t vrf_id, struct sockaddr *addr, const char *if_name, uint32_t ifn_index); - struct sctp_ifa * sctp_add_addr_to_vrf(uint32_t vrfid, void *ifn, uint32_t ifn_index, uint32_t ifn_type,