VRRP: fixed nopreempt from FAULT state
authorAlexandre Cassen <acassen@freebox.fr>
Mon, 28 Sep 2009 11:20:15 +0000 (13:20 +0200)
committerAlexandre Cassen <acassen@freebox.fr>
Mon, 28 Sep 2009 11:20:15 +0000 (13:20 +0200)
The owner of higher priority in FAULT state shouldn't preempt current MASTER when
it's recovering, if the nopreempt option is set.

keepalived/vrrp/vrrp.c

index ac86490..0eebf9b 100644 (file)
@@ -881,7 +881,8 @@ vrrp_state_fault_rx(vrrp_rt * vrrp, char *buf, int buflen)
                return 0;
        } else if (vrrp->effective_priority > hd->priority ||
                   hd->priority == VRRP_PRIO_OWNER)
-               return 1;
+               if (!vrrp->nopreempt)
+                       return 1;
 
        return 0;
 }