summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_carp.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2011-07-03 17:37:49 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2011-07-03 17:37:49 +0000
commit0d2af19c78323e7d0f8ce05a3feb226f7196ca60 (patch)
treed97691f0dd4146cd268cf2b3bf61bea8fbc3cbb6 /sys/netinet/ip_carp.c
parent190388d73834ef7b6b640f3c8847f1851c810876 (diff)
Do not use LINK_STATE_UNKNOWN for the INIT state. LINK_STATE_UNKNOWN has
a special meaning and should only be set if the link state is not known because it is considered as being up. Use LINK_STATE_INVALID instead. OK mpf@ mcbride@ henning@
Diffstat (limited to 'sys/netinet/ip_carp.c')
-rw-r--r--sys/netinet/ip_carp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index 7c1722d23cb..43634bf6443 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_carp.c,v 1.184 2011/05/04 16:05:49 blambert Exp $ */
+/* $OpenBSD: ip_carp.c,v 1.185 2011/07/03 17:37:48 claudio Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff. All rights reserved.
@@ -906,6 +906,7 @@ carp_clone_create(ifc, unit)
/* Hook carp_addr_updated to cope with address and route changes. */
sc->ah_cookie = hook_establish(sc->sc_if.if_addrhooks, 0,
carp_addr_updated, sc);
+ carp_set_state_all(sc, INIT);
return (0);
}
@@ -2557,7 +2558,7 @@ carp_set_state(struct carp_vhost_entry *vhe, int state)
sc->sc_if.if_link_state = LINK_STATE_UP;
break;
default:
- sc->sc_if.if_link_state = LINK_STATE_UNKNOWN;
+ sc->sc_if.if_link_state = LINK_STATE_INVALID;
break;
}
if_link_state_change(&sc->sc_if);