diff options
author | Marco Pfatschbacher <mpf@cvs.openbsd.org> | 2010-01-12 01:40:31 +0000 |
---|---|---|
committer | Marco Pfatschbacher <mpf@cvs.openbsd.org> | 2010-01-12 01:40:31 +0000 |
commit | c4150ce886d3a56c4f33e4a924c7d58e21899339 (patch) | |
tree | 6bbcfb862d045fa4b3e3f76589ca9d9f4bf07b5e /sys/netinet | |
parent | 623f44d6c383db9dbed403de744d605cdccadeca (diff) |
Remove the "bump the advskew to 240 in case of errors" hack.
The demote counter can handle that.
This lets carp hosts with an identical demote count still know which
one is the designated master and prevents them from failing over
asymmetrically.
Since there is a demote handling bug in all releases prior to 4.6,
symmetric failover will only work against 4.6 (and newer) from now on.
OK henning@
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_carp.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index ce5889e409e..a1ca1ca173d 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.c,v 1.172 2010/01/12 01:02:02 claudio Exp $ */ +/* $OpenBSD: ip_carp.c,v 1.173 2010/01/12 01:40:30 mpf Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -740,10 +740,7 @@ carp_proto_input_c(struct mbuf *m, struct carp_header *ch, int ismulti, } sc_tv.tv_sec = sc->sc_advbase; - if (carp_group_demote_count(sc) && vhe->advskew < 240) - sc_tv.tv_usec = 240 * 1000000 / 256; - else - sc_tv.tv_usec = vhe->advskew * 1000000 / 256; + sc_tv.tv_usec = vhe->advskew * 1000000 / 256; ch_tv.tv_sec = ch->carp_advbase; ch_tv.tv_usec = ch->carp_advskew * 1000000 / 256; @@ -1111,10 +1108,7 @@ carp_send_ad(void *v) advskew = 255; } else { advbase = sc->sc_advbase; - if (!carp_group_demote_count(sc) || vhe->advskew > 240) - advskew = vhe->advskew; - else - advskew = 240; + advskew = vhe->advskew; tv.tv_sec = advbase; tv.tv_usec = advskew * 1000000 / 256; } |