svn commit: r355449 - head/sys/netinet

Bjoern A. Zeeb bz at FreeBSD.org
Fri Dec 6 16:35:49 UTC 2019


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


More information about the svn-src-head mailing list