Skip to content

Commit

Permalink
vrrp: test for _HAVE_VRRP_VMAC_ before using VRRP_VMAC_BIT
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pqarmitage committed Nov 24, 2024
1 parent 0400738 commit 6b3c80f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions keepalived/vrrp/vrrp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6b3c80f

Please sign in to comment.