From 6b3c80f3bd0c09215b9aa04de9c52ae471cd11b8 Mon Sep 17 00:00:00 2001 From: Quentin Armitage Date: Sun, 24 Nov 2024 14:40:43 +0000 Subject: [PATCH] vrrp: test for _HAVE_VRRP_VMAC_ before using VRRP_VMAC_BIT Commit 0400738 - "vrrp: don't allow unicast instance without interface to have a VMAC" caused keepalived to fail to compile if VMACs were not enabled. --- keepalived/vrrp/vrrp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keepalived/vrrp/vrrp.c b/keepalived/vrrp/vrrp.c index 6ab76b5142..89fa6176e8 100644 --- a/keepalived/vrrp/vrrp.c +++ b/keepalived/vrrp/vrrp.c @@ -2399,10 +2399,12 @@ chk_min_cfg(vrrp_t *vrrp) report_config_error(CONFIG_GENERAL_ERROR, "(%s) Unknown interface!", vrrp->iname); return false; } +#ifdef _HAVE_VRRP_VMAC_ if (__test_bit(VRRP_VMAC_BIT, &vrrp->flags)) { report_config_error(CONFIG_GENERAL_ERROR, "(%s) cannot use VMAC if no interface specified", vrrp->iname); return false; } +#endif } return true;