Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Nov 2024 09:47:19 GMT
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 2a6bd6e37b47 - releng/14.2 - sctp: garbage collect two unused functions
Message-ID:  <202411070947.4A79lJFs010182@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch releng/14.2 has been updated by tuexen:

URL: https://cgit.FreeBSD.org/src/commit/?id=2a6bd6e37b472cee98873014ce58cddd947db148

commit 2a6bd6e37b472cee98873014ce58cddd947db148
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2024-11-02 16:58:09 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202411070947.4A79lJFs010182>