summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpf <mpf@openbsd.org>2011-10-30 20:38:55 +0000
committermpf <mpf@openbsd.org>2011-10-30 20:38:55 +0000
commit7a3631d76c94c37af6065734ee3fe7f919a422f3 (patch)
treefad5749f21657a58e1f299c3b062bf39a18973c7
parentsync (diff)
downloadwireguard-openbsd-7a3631d76c94c37af6065734ee3fe7f919a422f3.tar.xz
wireguard-openbsd-7a3631d76c94c37af6065734ee3fe7f919a422f3.zip
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.c4
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)