From nobody Thu Nov 07 09:47:19 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 4XkcgC67Ywz5cdqc; Thu, 07 Nov 2024 09:47:19 +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 4XkcgC55bRz4HbN; Thu, 7 Nov 2024 09:47:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730972839; 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=6axVbbtfSeV7k/1qK8DQsCTcD9Jf7FZicMPAXxBVw3Y=; b=Uuu4QqDdHoFa926585QIVHsBIjdlqjOclvUgTL/cPoMuQQ8qoBPAFxM2Kr+wS41f0uSlud OAt3QjKqVV8PCK55H+3wNsE4QhXu7SIJcBqa9FNBm0nlc8PgmB2qhDr55rVtw4MBlaIw5e SfAM7nteS/QiNCT6egTH0l0+wJnQF0S6C/AQ2aSE3u9AxCzMNTN/hzgYPRoPuhmC/7TqWL Nk2RlG/NsUgoUcYbVGSYAVoD8U1eGua64LHvydXuzGN7bu4YgvKzYyM9OCUK3hu0nzzWwB g15L2gNzOUlYIvA8sebRhkYrHaR42oJDw7bLY3U5Y0Hj/KosxMc3HB0xHvK0Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730972839; 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=6axVbbtfSeV7k/1qK8DQsCTcD9Jf7FZicMPAXxBVw3Y=; b=Hpkph+ZvB8w8WFypyBWRYcdQLtRDnHTLKASQyWDYQa9fzyQEuJGalZMbg29l1Un2q1mOz4 YQ/UNlNzCk0K2ksm3BKElwkwbjxpgR0VFZc2b+oiauwlDVeLtA5e26/aGXeg0r2gS/lSY/ YaCDeQ9hVceu68Xa29z3YJDEKOEvP2jYhLg0k6/vlDZgFHfU3ZJYtLZ3rNAAkEm7NRSdkk TGSxpO3Y54JJJdicf3o8S7lNdqagPCMxxbPzQHKTGNJRjc3nu6+yJ9GEcYfT1Ja365XZVT a82Ccsz1kCTM9mTC/9GdmPVFksbLdF7qUBR6NKXYNNhADO13XqA8kbIVz1FwYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730972839; a=rsa-sha256; cv=none; b=ZxGFraUcOoq7kPZxosGYZmdLMw7EWmEfpTgxSvuulp4hQRA5Dh2J4tDLHysEkO/lzRWUR9 YzNMghAPZfj+d3vXLiIbHNjf7xmGyjAiD1YXi9GWeSTGBMz2SfP6rMRGI0lwgletjfGTIJ NmqyIThRdQpYLkfT/qM+9Luh/OcfssMusLMPLHFtDXwLPGraHBS3x0IpDgD/r7LrMFZLSU aU4FjyMmhkG4wFgcAcwwjaQr+x+1aQmjTtQaCJMZY6TlJXvCSPDaG1kW0T+ShvrjudyG3c bph0zOjrmVwZmuM0N19e81R8OK/BYRCd6G3c4nRgW+b1hO8YZQ1JSWDdg40G6A== 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 4XkcgC4gYyzgk0; Thu, 7 Nov 2024 09:47:19 +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 4A79lJL5010185; Thu, 7 Nov 2024 09:47:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4A79lJFs010182; Thu, 7 Nov 2024 09:47:19 GMT (envelope-from git) Date: Thu, 7 Nov 2024 09:47:19 GMT Message-Id: <202411070947.4A79lJFs010182@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: 2a6bd6e37b47 - releng/14.2 - 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/releng/14.2 X-Git-Reftype: branch X-Git-Commit: 2a6bd6e37b472cee98873014ce58cddd947db148 Auto-Submitted: auto-generated The branch releng/14.2 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=2a6bd6e37b472cee98873014ce58cddd947db148 commit 2a6bd6e37b472cee98873014ce58cddd947db148 Author: Michael Tuexen AuthorDate: 2024-11-02 16:58:09 +0000 Commit: Michael Tuexen CommitDate: 2024-11-07 00:02:33 +0000 sctp: garbage collect two unused functions (cherry picked from commit 470a63cde4285ea4a317b0bba966514c11f4ed5b) (cherry picked from commit e3f26ce52b71d4005e666ced22c0855dbc70b28e) Approved by: re (cperviva) --- 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 cd5479c11e6a..5f21b2b3d0e4 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 1249c2233c63..736972c007d8 100644 --- a/sys/netinet/sctp_pcb.h +++ b/sys/netinet/sctp_pcb.h @@ -487,18 +487,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,