diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-11-23 13:32:26 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-11-23 13:32:26 +0000 |
commit | 67465fd603d528f730e49f0421b671deabc7972e (patch) | |
tree | 5de1d38aba2522b164cfb3f7425bb396d9c8d4d3 /sys | |
parent | 602f72dea8011b7a9c702eebcd696f0439cf9502 (diff) |
Replace non mp-safe carp_iamatch6() with mp-safe carp_iamatch().
They have the same functionnality since friehm@ cleaned up
balancing code.
ok florian@, visa@, patrick@, bluhm@, jmatthew@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_carp.c | 18 | ||||
-rw-r--r-- | sys/netinet/ip_carp.h | 3 | ||||
-rw-r--r-- | sys/netinet6/in6.c | 4 | ||||
-rw-r--r-- | sys/netinet6/nd6_nbr.c | 8 |
4 files changed, 8 insertions, 25 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 7b4e0b194d5..50f37e2deaf 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.c,v 1.319 2017/11/21 09:08:55 patrick Exp $ */ +/* $OpenBSD: ip_carp.c,v 1.320 2017/11/23 13:32:25 mpi Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -1352,22 +1352,6 @@ carp_iamatch(struct ifnet *ifp) return (match); } -#ifdef INET6 -int -carp_iamatch6(struct ifnet *ifp) -{ - struct carp_softc *sc = ifp->if_softc; - struct carp_vhost_entry *vhe = SRPL_FIRST_LOCKED(&sc->carp_vhosts); - - KERNEL_ASSERT_LOCKED(); /* touching carp_vhosts */ - - if (vhe->state == MASTER) - return (1); - - return (0); -} -#endif /* INET6 */ - struct ifnet * carp_ourether(void *v, u_int8_t *ena) { diff --git a/sys/netinet/ip_carp.h b/sys/netinet/ip_carp.h index 612b9a20952..5d401ed8049 100644 --- a/sys/netinet/ip_carp.h +++ b/sys/netinet/ip_carp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.h,v 1.43 2017/05/30 12:09:27 friehm Exp $ */ +/* $OpenBSD: ip_carp.h,v 1.44 2017/11/23 13:32:25 mpi Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -199,7 +199,6 @@ void carp_carpdev_state(void *); void carp_group_demote_adj(struct ifnet *, int, char *); int carp6_proto_input(struct mbuf **, int *, int, int); int carp_iamatch(struct ifnet *); -int carp_iamatch6(struct ifnet *); struct ifnet *carp_ourether(void *, u_int8_t *); int carp_output(struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *); diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index dc101dba578..1c5ec065aa5 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6.c,v 1.218 2017/11/04 13:11:54 mpi Exp $ */ +/* $OpenBSD: in6.c,v 1.219 2017/11/23 13:32:25 mpi Exp $ */ /* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */ /* @@ -1287,7 +1287,7 @@ in6_ifawithscope(struct ifnet *oifp, struct in6_addr *dst, u_int rdomain) * Never use a carp address of an interface which is not * the master. */ - if (ifp->if_type == IFT_CARP && !carp_iamatch6(ifp)) + if (ifp->if_type == IFT_CARP && !carp_iamatch(ifp)) continue; #endif diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index 7dc48780275..cb5c04c24ed 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6_nbr.c,v 1.121 2017/08/11 21:24:20 mpi Exp $ */ +/* $OpenBSD: nd6_nbr.c,v 1.122 2017/11/23 13:32:25 mpi Exp $ */ /* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */ /* @@ -218,7 +218,7 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len) /* (1) and (3) check. */ ifa = &in6ifa_ifpwithaddr(ifp, &taddr6)->ia_ifa; #if NCARP > 0 - if (ifp->if_type == IFT_CARP && ifa && !carp_iamatch6(ifp)) + if (ifp->if_type == IFT_CARP && ifa && !carp_iamatch(ifp)) ifa = NULL; #endif @@ -668,7 +668,7 @@ nd6_na_input(struct mbuf *m, int off, int icmp6len) * Ignore NAs silently for carp addresses if we're not * the CARP master. */ - if (ifp->if_type == IFT_CARP && !carp_iamatch6(ifp)) + if (ifp->if_type == IFT_CARP && !carp_iamatch(ifp)) goto freeit; #endif log(LOG_ERR, @@ -1014,7 +1014,7 @@ nd6_na_output(struct ifnet *ifp, struct in6_addr *daddr6, #if NCARP > 0 /* Do not send NAs for carp addresses if we're not the CARP master. */ - if (ifp->if_type == IFT_CARP && !carp_iamatch6(ifp)) + if (ifp->if_type == IFT_CARP && !carp_iamatch(ifp)) goto bad; #endif |