From nobody Wed Nov 06 10:12:02 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 4Xk1GB6NbCz5cPW3; Wed, 06 Nov 2024 10:12:02 +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 4Xk1GB5wnKz4cdT; Wed, 6 Nov 2024 10:12:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730887922; 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=u7Uo2xAU8UcgI03hN3N7FWpcyHsQ3tLKrj7ATSm1mqg=; b=csIBMi2NqcKH4zX4GIi+5+38eYZGhxsOMquOjVCfBlp4BfGLwMoECuW0wspGoWVRp1/FpG 2n0TDvxHEMtSqJI8ty4S5SUwhgviMitAzRdz9FaEd5ehqNAy7g9L8ixjx5JjGYALb9TDbh 8QJNfs9XpSL5MomDvRudlSabkmSxojU5o1u1OTlDBGH5bFt0oDBk18jMB9KclqCMkNzlKA RWZdvWPRrNal1ZwJU8d1OWwTBlO4ZY8uw8yJUCCOsOBnOXV7jRiEvWVksxMPQPKXfE2R2X xjfvNTRuQzVSmIHsmVHiwEyznggO3xwdhhK52YW6oHC1Hsw4hN5rhJhHirCxVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730887922; 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=u7Uo2xAU8UcgI03hN3N7FWpcyHsQ3tLKrj7ATSm1mqg=; b=gdloGEWXJP2o1ks4STjf/KeusOEFkoPCnwpf8A0NwI2TCIF/ch9Ba/YbdoPfmkjZlTLiAk 0ZvEeG/nbR5tD/f0xe6LKYKcqRIR9KGIObA8LQVxNclaId6Dntg6TLis280HzEMdPRdeWh 7Qedk4ZyMGimE3ixNVNWB5EPrSQAKBuRTPNO9wpxUsY3vmaHWg/hnOqfEYYaqFjPSshKT4 44IdcZDK/yvCZILAxgysoz01Bn0xw3HGq4SF9JRy22VaLKH2H8xlelG5jxB/w0bnyVkQ4Q M8aSrX+wRNGt2CA5G7K784ODj7P8BHes45rvxmToamYS6j75Uu2z5Oj1Hx/d8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730887922; a=rsa-sha256; cv=none; b=KZEUXaD56FEzUmFp6XySZZyq6JurdeqSkh4Tpnh7KeaHJz76BigbAVkCHhcjdmnht8PNNa GgErRws11hbXTsDOmrl5KDCcZvrHGiamdhKULB6RbceaMoHouRnxYlXcT4aT/BqSLifaOI yDA0jQAbS208OSGsH/Vxumad+qoz8sqm5EaOmLklaxg5YVogRLvsb6I9eciabDo3RNChSw Vzt8MDEkzfgYWJ2FbIEWA+en7EX4k+6+2AuyzJb2ep42tEgcDr2vJBMCh2+DCaXwYel4eh oKTKZcXfiqnr6e9A4BYCp4FqeTPWT1l3eAm24OHg//sa3vkvJenJ2RxuwwWLrg== 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 4Xk1GB5XdLzx6d; Wed, 6 Nov 2024 10:12:02 +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 4A6AC2dk080580; Wed, 6 Nov 2024 10:12:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4A6AC2Kr080577; Wed, 6 Nov 2024 10:12:02 GMT (envelope-from git) Date: Wed, 6 Nov 2024 10:12:02 GMT Message-Id: <202411061012.4A6AC2Kr080577@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: 1550ba066216 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 1550ba066216ba91ac92185bc5c23a571b028403 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=1550ba066216ba91ac92185bc5c23a571b028403 commit 1550ba066216ba91ac92185bc5c23a571b028403 Author: Michael Tuexen AuthorDate: 2024-11-02 16:58:09 +0000 Commit: Michael Tuexen CommitDate: 2024-11-06 09:11:34 +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 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,