diff options
author | 2016-11-20 11:40:58 +0000 | |
---|---|---|
committer | 2016-11-20 11:40:58 +0000 | |
commit | f8e0b8c2b59f57138f5aae75f825b4fe202f85eb (patch) | |
tree | 5c8e14baed544ead635fb1a9c59d82e48b1ea9e2 /sys/netinet | |
parent | Fix up some permissions in RELEASEDIR and /var/sysmerge. (diff) | |
download | wireguard-openbsd-f8e0b8c2b59f57138f5aae75f825b4fe202f85eb.tar.xz wireguard-openbsd-f8e0b8c2b59f57138f5aae75f825b4fe202f85eb.zip |
Rename SRPL_ENTER() to SRPL_FIRST() and SRPL_NEXT() to SRPL_FOLLOW().
This allows us to introduce SRPL_NEXT() that can be used to start
iterating on an arbitrary member of an srp list, hence without calling
SRPL_ENTER().
ok dlg@, jmatthew@
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_carp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index ff3ae78600d..73d959eac26 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.c,v 1.295 2016/10/25 07:21:02 yasuoka Exp $ */ +/* $OpenBSD: ip_carp.c,v 1.296 2016/11/20 11:40:58 mpi Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -1329,7 +1329,7 @@ carp_iamatch(struct ifnet *ifp) struct srp_ref sr; int match = 0; - vhe = SRPL_ENTER(&sr, &sc->carp_vhosts); /* head */ + vhe = SRPL_FIRST(&sr, &sc->carp_vhosts); if (vhe->state == MASTER) match = 1; SRPL_LEAVE(&sr); @@ -1381,7 +1381,7 @@ carp_vhe_match(struct carp_softc *sc, uint8_t *ena) struct srp_ref sr; int match = 0; - vhe = SRPL_ENTER(&sr, &sc->carp_vhosts); /* head */ + vhe = SRPL_FIRST(&sr, &sc->carp_vhosts); match = (vhe->state == MASTER || sc->sc_balancing >= CARP_BAL_IP) && !memcmp(ena, sc->sc_ac.ac_enaddr, ETHER_ADDR_LEN); SRPL_LEAVE(&sr); @@ -2312,7 +2312,7 @@ carp_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *sa, KASSERT(sc->sc_carpdev != NULL); if (sc->cur_vhe == NULL) { - vhe = SRPL_ENTER(&sr, &sc->carp_vhosts); /* head */ + vhe = SRPL_FIRST(&sr, &sc->carp_vhosts); ismaster = (vhe->state == MASTER); SRPL_LEAVE(&sr); } else { |