diff options
author | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2004-03-26 08:31:59 +0000 |
---|---|---|
committer | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2004-03-26 08:31:59 +0000 |
commit | 2b3a2893fd4a733da1be95fd50ece89246425134 (patch) | |
tree | 5386d6ac74ce806ebcbbe85d5f01c00ee0857edd /sys/netinet/ip_carp.c | |
parent | da64e795de5dea2888362589ec1b47a9adec4bc4 (diff) |
Also raise advskew to 240 while we wait for pfsync to get it's bulk update.
This is to deal with situations where the network is not working during boot
so we become master by default - the high advskew value allows other carp
boxes to preempt us when the network finally comes up.
ok deraadt@ beck@
Diffstat (limited to 'sys/netinet/ip_carp.c')
-rw-r--r-- | sys/netinet/ip_carp.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 319893a3db5..b0bd1bf3641 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.c,v 1.42 2004/03/24 06:54:04 mcbride Exp $ */ +/* $OpenBSD: ip_carp.c,v 1.43 2004/03/26 08:31:58 mcbride Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -727,7 +727,12 @@ carp_send_ad(void *v) advskew = 255; } else { advbase = sc->sc_advbase; - advskew = sc->sc_advskew; + if (pfsync_sync_ok) + advskew = sc->sc_advskew; + else { + if (sc->sc_advskew < 240) + advskew = 240; + } tv.tv_sec = advbase; tv.tv_usec = advskew * 1000000 / 256; } |