diff options
author | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2004-12-08 06:57:56 +0000 |
---|---|---|
committer | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2004-12-08 06:57:56 +0000 |
commit | a3a34c3c6b12a2a3e9461379fbe1d73dc712b8ae (patch) | |
tree | 75988a556304c25e04a9dafa629848cf1264e912 /sys/netinet/ip_carp.c | |
parent | cf2a4811a40c723ce40bfe6bade0eed5883ed287 (diff) |
Check if_type in carp_carpdev_state() to make sure we're not
dealing with a carp interface.
Diffstat (limited to 'sys/netinet/ip_carp.c')
-rw-r--r-- | sys/netinet/ip_carp.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index fdc0e5c7aab..2179a8868b0 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.c,v 1.73 2004/12/07 20:38:47 mcbride Exp $ */ +/* $OpenBSD: ip_carp.c,v 1.74 2004/12/08 06:57:55 mcbride Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -2041,11 +2041,16 @@ carp_set_state(struct carp_softc *sc, int state) } void -carp_carpdev_state(void *v) +carp_carpdev_state(struct ifnet *ifp) { - struct carp_if *cif = v; + struct carp_if *cif; struct carp_softc *sc; + if (ifp->if_type == IFT_CARP) + return; + + cif = (struct carp_if *)ifp->if_carp; + TAILQ_FOREACH(sc, &cif->vhif_vrs, sc_list) { if (sc->sc_carpdev->if_link_state == LINK_STATE_DOWN || !(sc->sc_carpdev->if_flags & IFF_UP)) { |