vrrpd: do not start v6 router if using VRRPv2

v2 doesn't support IPv6.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
Quentin Young 2019-03-14 15:54:49 +00:00
parent e1a32d7637
commit 26c7454b7f

View File

@ -304,6 +304,9 @@ void vrrp_check_start(struct vrrp_vrouter *vr)
r = vr->v6;
/* Must not already be started */
start = r->fsm.state == VRRP_STATE_INITIALIZE;
/* Must not be v2 */
start = vr->version != 2;
whynot = (!start && !whynot) ? "VRRPv2 does not support v6" : NULL;
/* Must have a parent interface */
start = start && (vr->ifp != NULL);
whynot = (!start && !whynot) ? "No base interface" : NULL;