diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-12-10 22:16:10 +0000 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-05-17 00:27:08 +0000 |
| commit | 5d3730c5f14c4cf60d965093ff4945101092be9e (patch) | |
| tree | bca6f8876f6e395eaec5da3c36f10bfdcb6fa8c9 /vrrpd/vrrp.h | |
| parent | 3e7a4043ff23b77901b5a3ccd980efac577bb59d (diff) | |
vrrpd: elect self to Master when owning v4 address
If the primary address is v4, and we own the address on our configured
interface, set ourselves to Master.
This introduces the concept of a separate priority value used to store
the configured vs effective priority.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'vrrpd/vrrp.h')
| -rw-r--r-- | vrrpd/vrrp.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/vrrpd/vrrp.h b/vrrpd/vrrp.h index 6ce0e03bf4..b86aba9939 100644 --- a/vrrpd/vrrp.h +++ b/vrrpd/vrrp.h @@ -71,10 +71,14 @@ struct vrrp_vrouter { */ struct list *v6; - /* Whether this VRRP Router is currently the master */ - bool is_master; + /* Configured priority */ + uint8_t priority_conf; - /* Priority */ + /* + * Effective priority + * => priority if we are Backup + * => 255 if we are Master + */ uint8_t priority; /* @@ -159,9 +163,12 @@ void vrrp_vrouter_destroy(struct vrrp_vrouter *vr); /* Configuration controllers ----------------------------------------------- */ /* - * Change the priority of a VRRP Virtual Router. + * Change the configured priority of a VRRP Virtual Router. * - * Also recalculates timers using new priority. + * Note that this only changes the configured priority of the Virtual Router. + * The currently effective priority will not be changed; to change the + * effective priority, the Virtual Router must be restarted by issuing a + * VRRP_EVENT_SHUTDOWN followed by a VRRP_EVENT_STARTUP. * * vr * Virtual Router to change priority of |
