On 11-1-2012 15:54, Henning Brauer wrote: > * Stuart Henderson <[email protected]> [2012-01-11 15:51]: >> On 2011/12/31 20:24, Camiel Dobbelaar wrote: >>> + if (env->sc_flags & F_DEMOTE) >>> + carp_demote_reset(env->sc_demote_group, 0); >>> + >> >> hmmm, forcing the counter to 0 doesn't interact very well with >> routing daemons which may have increased the counter because an >> important peer or interface is down .. >> >> is there a need to do it this way rather than increment/decrement >> the counter by a fixed amount? > > stuart is right. no daemon should ever set the demotion counter to a > absolute value, just increase and decrease, and decrease no more than > itself has increased.
Hmm, well I just resurrected what got lost in a previous commit. Maybe we should take the global demote option out then, I don't think there is a way that relayd can tell that the demote counter was raised by a previous relayd. (besides picking some magic value) Here's the manpage description from relayd.conf: > demote group > Enable the global carp(4) demotion option, resetting the carp > demotion counter for the specified interface group to zero on > startup and to 128 on shutdown of the daemon. For more > information on interface groups, see the group keyword in > ifconfig(8).
