From 9d28c6086612f1bce0c625c295cfdb38633eedfd Mon Sep 17 00:00:00 2001 From: Ryan Thomas McBride Date: Mon, 10 May 2004 02:18:53 +0000 Subject: Make sure advskew set correctly in advertisement when configured to a value greater than 240. From Frank Denis , PR3774. --- sys/netinet/ip_carp.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'sys') 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; } -- cgit v1.2.3