summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Pfatschbacher <mpf@cvs.openbsd.org>2005-11-27 10:58:07 +0000
committerMarco Pfatschbacher <mpf@cvs.openbsd.org>2005-11-27 10:58:07 +0000
commitbbe8c6e261b839a145a0fcb81f07c01806263019 (patch)
tree18759bc6d5dc06ec39146c33b2d72fb7fe2bdcb9
parent1058a59e76e790b791db025eae0b3c69645a9b5b (diff)
Completly remove transition path INIT -> MASTER.
A bug introduced in -r 1.4 led lower priotorized hosts switching to MASTER state for a short time at bootup, if preemption was enabled. OK mcbride@
-rw-r--r--sys/netinet/ip_carp.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index eea46e842dc..5da78dcc80d 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_carp.c,v 1.114 2005/11/27 10:48:59 mcbride Exp $ */
+/* $OpenBSD: ip_carp.c,v 1.115 2005/11/27 10:58:06 mpf Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff. All rights reserved.
@@ -1365,19 +1365,9 @@ carp_setrun(struct carp_softc *sc, sa_family_t af)
switch (sc->sc_state) {
case INIT:
- if (carp_opts[CARPCTL_PREEMPT] && !carp_suppress_preempt) {
- carp_set_state(sc, MASTER);
- carp_setroute(sc, RTM_ADD);
- carp_send_ad(sc);
- carp_send_arp(sc);
-#ifdef INET6
- carp_send_na(sc);
-#endif /* INET6 */
- } else {
- carp_set_state(sc, BACKUP);
- carp_setroute(sc, RTM_DELETE);
- carp_setrun(sc, 0);
- }
+ carp_set_state(sc, BACKUP);
+ carp_setroute(sc, RTM_DELETE);
+ carp_setrun(sc, 0);
break;
case BACKUP:
timeout_del(&sc->sc_ad_tmo);