Keep previous effective VRRP priority on reload.
authorVincent Bernat <bernat@luffy.cx>
Tue, 6 Oct 2009 13:38:03 +0000 (13:38 +0000)
committerAlexandre Cassen <acassen@freebox.fr>
Thu, 5 Nov 2009 17:13:20 +0000 (18:13 +0100)
When using weighted scripts or interfaces, on reload, the VRRP
priority is resetted to the default priority for the first packets to
be sent, until vrrp_update_priority() thread is called.

keepalived/vrrp/vrrp.c

index a0673f0..bca43f5 100644 (file)
@@ -1108,6 +1108,7 @@ reset_vrrp_state(vrrp_rt * old_vrrp)
        vrrp->state = old_vrrp->state;
        vrrp->init_state = old_vrrp->state;
        vrrp->wantstate = old_vrrp->state;
+       vrrp->effective_priority = old_vrrp->effective_priority;
        memcpy(vrrp->ipsecah_counter, old_vrrp->ipsecah_counter, sizeof(seq_counter));
 
 #ifdef _HAVE_IPVS_SYNCD_