From owner-svn-src-head@freebsd.org Fri Dec 6 16:35:49 2019 Return-Path: Delivered-To: svn-src-head@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 4E4311CFD59; Fri, 6 Dec 2019 16:35:49 +0000 (UTC) (envelope-from bz@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47TyrP1Rq6z4bW9; Fri, 6 Dec 2019 16:35:49 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EFFD1416D; Fri, 6 Dec 2019 16:35:48 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xB6GZmEi042393; Fri, 6 Dec 2019 16:35:48 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xB6GZmpS042391; Fri, 6 Dec 2019 16:35:48 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201912061635.xB6GZmpS042391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Fri, 6 Dec 2019 16:35:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r355449 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 355449 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Dec 2019 16:35:49 -0000 Author: bz Date: Fri Dec 6 16:35:48 2019 New Revision: 355449 URL: https://svnweb.freebsd.org/changeset/base/355449 Log: carp: replace caddr_t with char * Change the remaining caddr_t usages to char * following the removal of the KAME macros No functional change. Requested by: glebius Reviewed by: glebius MFC after: 2 weeks Sponsored by: Netflix (originally) Differential Revision: https://reviews.freebsd.org/D22399 Modified: head/sys/netinet/ip_carp.c head/sys/netinet/ip_carp.h Modified: head/sys/netinet/ip_carp.c ============================================================================== --- head/sys/netinet/ip_carp.c Fri Dec 6 16:34:04 2019 (r355448) +++ head/sys/netinet/ip_carp.c Fri Dec 6 16:35:48 2019 (r355449) @@ -575,7 +575,7 @@ carp6_input(struct mbuf **mp, int *offp, int proto) return (IPPROTO_DONE); } } - ch = (struct carp_header *)(mtod(m, caddr_t) + *offp); + ch = (struct carp_header *)(mtod(m, char *) + *offp); /* verify the CARP checksum */ @@ -978,6 +978,7 @@ carp_send_ad_locked(struct carp_softc *sc) #endif /* INET */ #ifdef INET6 if (sc->sc_naddrs6) { + struct epoch_tracker et; struct ip6_hdr *ip6; m = m_gethdr(M_NOWAIT, MT_DATA); @@ -1031,8 +1032,10 @@ carp_send_ad_locked(struct carp_softc *sc) CARPSTATS_INC(carps_opackets6); + NET_EPOCH_ENTER(et); carp_send_ad_error(sc, ip6_output(m, NULL, NULL, 0, &sc->sc_carpdev->if_carp->cif_im6o, NULL, NULL)); + NET_EPOCH_EXIT(et); } #endif /* INET6 */ @@ -1190,7 +1193,7 @@ carp_iamatch6(struct ifnet *ifp, struct in6_addr *tadd return (ifa); } -caddr_t +char * carp_macmatch6(struct ifnet *ifp, struct mbuf *m, const struct in6_addr *taddr) { struct ifaddr *ifa; @@ -1847,7 +1850,7 @@ carp_ioctl(struct ifreq *ifr, u_long cmd, struct threa carp_carprcp(&carpr, sc, priveleged); carpr.carpr_count = count; error = copyout(&carpr, - (caddr_t)ifr_data_get_ptr(ifr) + + (char *)ifr_data_get_ptr(ifr) + (i * sizeof(carpr)), sizeof(carpr)); if (error) { CIF_UNLOCK(ifp->if_carp); Modified: head/sys/netinet/ip_carp.h ============================================================================== --- head/sys/netinet/ip_carp.h Fri Dec 6 16:34:04 2019 (r355448) +++ head/sys/netinet/ip_carp.h Fri Dec 6 16:35:48 2019 (r355449) @@ -149,7 +149,7 @@ int carp_output (struct ifnet *, struct mbuf *, int carp_master(struct ifaddr *); int carp_iamatch(struct ifaddr *, uint8_t **); struct ifaddr *carp_iamatch6(struct ifnet *, struct in6_addr *); -caddr_t carp_macmatch6(struct ifnet *, struct mbuf *, const struct in6_addr *); +char * carp_macmatch6(struct ifnet *, struct mbuf *, const struct in6_addr *); int carp_forus(struct ifnet *, u_char *); /* These are external networking stack hooks for CARP */ @@ -174,7 +174,7 @@ extern int (*carp_iamatch_p)(struct ifaddr *, uint8_t #ifdef INET6 /* netinet6/nd6_nbr.c */ extern struct ifaddr *(*carp_iamatch6_p)(struct ifnet *, struct in6_addr *); -extern caddr_t (*carp_macmatch6_p)(struct ifnet *, struct mbuf *, +extern char * (*carp_macmatch6_p)(struct ifnet *, struct mbuf *, const struct in6_addr *); #endif #endif