summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorRyan Thomas McBride <mcbride@cvs.openbsd.org>2005-01-29 10:06:17 +0000
committerRyan Thomas McBride <mcbride@cvs.openbsd.org>2005-01-29 10:06:17 +0000
commit83991e354b7cfd2b21bf386d8a889d85137be212 (patch)
treed6b591730f8f553e18319b24f4327905ed4de17a /sys/netinet
parentafdac00176bb098a105ce96359a9e0668639834b (diff)
Check the carpdev link state when we attach to it, makes a firewall
with an interface down avoid preempting after a reboot. Pointed out by Stephen Marley <stephen.marley@catwoman.cl-is.com> ok pascoe@ mpf@
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_carp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index ff29ed9991a..bfa608cf9d8 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_carp.c,v 1.94 2005/01/18 23:26:52 mpf Exp $ */
+/* $OpenBSD: ip_carp.c,v 1.95 2005/01/29 10:06:16 mcbride Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff. All rights reserved.
@@ -1504,6 +1504,7 @@ carp_set_ifp(struct carp_softc *sc, struct ifnet *ifp)
if (sc->sc_naddrs || sc->sc_naddrs6)
sc->sc_if.if_flags |= IFF_UP;
carp_set_enaddr(sc);
+ carp_carpdev_state(ifp);
} else {
carpdetach(sc);
sc->sc_if.if_flags &= ~(IFF_UP|IFF_RUNNING);