diff options
author | Marco Pfatschbacher <mpf@cvs.openbsd.org> | 2011-10-30 20:38:56 +0000 |
---|---|---|
committer | Marco Pfatschbacher <mpf@cvs.openbsd.org> | 2011-10-30 20:38:56 +0000 |
commit | cb00ea8cd88dee0b31d269cefd0339932e02b50b (patch) | |
tree | 875b9fb5c45899edb2f3edd60e689c1c516a5dcb | |
parent | 7da593bec8612e122f4af756f0128a050dcff38c (diff) |
In the advbase 0 case, we have to use three times
the advskew as the master down timeout.
OK henning.
-rw-r--r-- | sys/netinet/ip_carp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 008bc9cb617..d861ee53b08 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.c,v 1.192 2011/10/24 17:48:31 camield Exp $ */ +/* $OpenBSD: ip_carp.c,v 1.193 2011/10/30 20:38:55 mpf Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -1732,6 +1732,8 @@ carp_setrun(struct carp_vhost_entry *vhe, sa_family_t af) tv.tv_sec = 3 * sc->sc_advbase; if (sc->sc_advbase == 0 && vhe->advskew == 0) tv.tv_usec = 3 * 1000000 / 256; + else if (sc->sc_advbase == 0) + tv.tv_usec = 3 * vhe->advskew * 1000000 / 256; else tv.tv_usec = vhe->advskew * 1000000 / 256; if (vhe->vhe_leader) |