summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/mii/mii_physubr.c4
-rw-r--r--sys/net/if.c6
-rw-r--r--sys/netinet/ip_carp.c11
-rw-r--r--sys/netinet/ip_carp.h4
4 files changed, 15 insertions, 10 deletions
diff --git a/sys/dev/mii/mii_physubr.c b/sys/dev/mii/mii_physubr.c
index de21e2be9fb..f95da9ec7d0 100644
--- a/sys/dev/mii/mii_physubr.c
+++ b/sys/dev/mii/mii_physubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mii_physubr.c,v 1.22 2004/11/18 16:15:33 brad Exp $ */
+/* $OpenBSD: mii_physubr.c,v 1.23 2004/12/08 06:57:55 mcbride Exp $ */
/* $NetBSD: mii_physubr.c,v 1.20 2001/04/13 23:30:09 thorpej Exp $ */
/*-
@@ -382,7 +382,7 @@ mii_phy_statusmsg(struct mii_softc *sc)
splx(s);
#if NCARP > 0
if (ifp->if_carp)
- carp_carpdev_state(ifp->if_carp);
+ carp_carpdev_state(ifp);
#endif
}
}
diff --git a/sys/net/if.c b/sys/net/if.c
index 7ab0472ce97..5e8207a29f4 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.97 2004/12/07 20:38:46 mcbride Exp $ */
+/* $OpenBSD: if.c,v 1.98 2004/12/08 06:57:55 mcbride Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@ -1038,7 +1038,7 @@ if_down(struct ifnet *ifp)
IFQ_PURGE(&ifp->if_snd);
#if NCARP > 0
if (ifp->if_carp)
- carp_carpdev_state(ifp->if_carp);
+ carp_carpdev_state(ifp);
#endif
rt_ifmsg(ifp);
}
@@ -1067,7 +1067,7 @@ if_up(struct ifnet *ifp)
#endif
#if NCARP > 0
if (ifp->if_carp)
- carp_carpdev_state(ifp->if_carp);
+ carp_carpdev_state(ifp);
#endif
rt_ifmsg(ifp);
#ifdef INET6
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)) {
diff --git a/sys/netinet/ip_carp.h b/sys/netinet/ip_carp.h
index a46b26fd207..0c6720671f3 100644
--- a/sys/netinet/ip_carp.h
+++ b/sys/netinet/ip_carp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_carp.h,v 1.9 2004/12/07 20:38:47 mcbride Exp $ */
+/* $OpenBSD: ip_carp.h,v 1.10 2004/12/08 06:57:55 mcbride Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff. All rights reserved.
@@ -153,7 +153,7 @@ struct carpreq {
#ifdef _KERNEL
void carp_ifdetach (struct ifnet *);
void carp_proto_input (struct mbuf *, ...);
-void carp_carpdev_state(void *);
+void carp_carpdev_state(struct ifnet *);
int carp6_proto_input(struct mbuf **, int *, int);
int carp_output(struct ifnet *, struct mbuf *, struct sockaddr *,
struct rtentry *);