diff options
author | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2004-05-10 02:18:53 +0000 |
---|---|---|
committer | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2004-05-10 02:18:53 +0000 |
commit | 9d28c6086612f1bce0c625c295cfdb38633eedfd (patch) | |
tree | 00dabc8afd2bea4f20274da9b54c6bbad4e83cd0 /sys/netinet/ip_carp.c | |
parent | 64ac7fcba45f59c3ebe2d13c5b05fe8cad4aca49 (diff) |
Make sure advskew set correctly in advertisement when configured to a value
greater than 240. From Frank Denis <j@pureftpd.org>, PR3774.
Diffstat (limited to 'sys/netinet/ip_carp.c')
-rw-r--r-- | sys/netinet/ip_carp.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 260913a3876..a17000abf7a 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.c,v 1.46 2004/05/08 02:53:03 mcbride Exp $ */ +/* $OpenBSD: ip_carp.c,v 1.47 2004/05/10 02:18:52 mcbride Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -731,12 +731,10 @@ carp_send_ad(void *v) advskew = 255; } else { advbase = sc->sc_advbase; - if (!carp_suppress_preempt) + if (!carp_suppress_preempt || sc->sc_advskew > 240) advskew = sc->sc_advskew; - else { - if (sc->sc_advskew < 240) - advskew = 240; - } + else + advskew = 240; tv.tv_sec = advbase; tv.tv_usec = advskew * 1000000 / 256; } |