From owner-dev-commits-src-all@freebsd.org Thu Feb 25 12:31:17 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 074A35614F5; Thu, 25 Feb 2021 12:31:17 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DmXFw6mVCz4cR2; Thu, 25 Feb 2021 12:31:16 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 D09511746F; Thu, 25 Feb 2021 12:31:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 11PCVGeX013076; Thu, 25 Feb 2021 12:31:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11PCVGrU013075; Thu, 25 Feb 2021 12:31:16 GMT (envelope-from git) Date: Thu, 25 Feb 2021 12:31:16 GMT Message-Id: <202102251231.11PCVGrU013075@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: f3245be3499b - main - net: remove legacy in_addmulti() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f3245be3499b60e790f59f84ebe24f9cc91dd982 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2021 12:31:17 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f3245be3499b60e790f59f84ebe24f9cc91dd982 commit f3245be3499b60e790f59f84ebe24f9cc91dd982 Author: Kristof Provost AuthorDate: 2021-02-23 19:21:19 +0000 Commit: Kristof Provost CommitDate: 2021-02-25 09:13:52 +0000 net: remove legacy in_addmulti() Despite the comment to the contrary neither pf nor carp use in_addmulti(). Nothing does, so get rid of it. Carp stopped using it in 08b68b0e4c6b132127919cfbaf7275c727ca7843 (2011). It's unclear when pf stopped using it, but before d6d3f01e0a3395c1fae34a3c4be7b051cb2d7581 (2012). Reviewed by: bz@, melifaro@ Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D28918 --- sys/netinet/in_mcast.c | 29 ----------------------------- sys/netinet/in_var.h | 2 -- 2 files changed, 31 deletions(-) diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c index 6d390a0b263c..392856785dd2 100644 --- a/sys/netinet/in_mcast.c +++ b/sys/netinet/in_mcast.c @@ -120,8 +120,6 @@ int ifma_restart; * Functions with non-static linkage defined in this file should be * declared in in_var.h: * imo_multi_filter() - * in_addmulti() - * in_delmulti() * in_joingroup() * in_joingroup_locked() * in_leavegroup() @@ -130,9 +128,6 @@ int ifma_restart; * inp_freemoptions() * inp_getmoptions() * inp_setmoptions() - * - * XXX: Both carp and pf need to use the legacy (*,G) KPIs in_addmulti() - * and in_delmulti(). */ static void imf_commit(struct in_mfilter *); static int imf_get_source(struct in_mfilter *imf, @@ -1367,30 +1362,6 @@ in_leavegroup_locked(struct in_multi *inm, /*const*/ struct in_mfilter *imf) } /*#ifndef BURN_BRIDGES*/ -/* - * Join an IPv4 multicast group in (*,G) exclusive mode. - * The group must be a 224.0.0.0/24 link-scope group. - * This KPI is for legacy kernel consumers only. - */ -struct in_multi * -in_addmulti(struct in_addr *ap, struct ifnet *ifp) -{ - struct in_multi *pinm; - int error; -#ifdef INVARIANTS - char addrbuf[INET_ADDRSTRLEN]; -#endif - - KASSERT(IN_LOCAL_GROUP(ntohl(ap->s_addr)), - ("%s: %s not in 224.0.0.0/24", __func__, - inet_ntoa_r(*ap, addrbuf))); - - error = in_joingroup(ifp, ap, NULL, &pinm); - if (error != 0) - pinm = NULL; - - return (pinm); -} /* * Block or unblock an ASM multicast source on an inpcb. diff --git a/sys/netinet/in_var.h b/sys/netinet/in_var.h index c7ebff80e56d..b42ca00d5ae7 100644 --- a/sys/netinet/in_var.h +++ b/sys/netinet/in_var.h @@ -450,8 +450,6 @@ int inm_record_source(struct in_multi *inm, const in_addr_t); void inm_release_deferred(struct in_multi *); void inm_release_list_deferred(struct in_multi_head *); void inm_release_wait(void *); -struct in_multi * -in_addmulti(struct in_addr *, struct ifnet *); int in_joingroup(struct ifnet *, const struct in_addr *, /*const*/ struct in_mfilter *, struct in_multi **); int in_joingroup_locked(struct ifnet *, const struct in_addr *,