From c4150ce886d3a56c4f33e4a924c7d58e21899339 Mon Sep 17 00:00:00 2001 From: Marco Pfatschbacher Date: Tue, 12 Jan 2010 01:40:31 +0000 Subject: 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@ --- sys/netinet/ip_carp.c | 12 +++--------- 1 file 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; } -- cgit v1.2.3