diff --git a/keepalived/vrrp/vrrp_parser.c b/keepalived/vrrp/vrrp_parser.c index 635cafaa5e..499ea60920 100644 --- a/keepalived/vrrp/vrrp_parser.c +++ b/keepalived/vrrp/vrrp_parser.c @@ -571,6 +571,7 @@ vrrp_vmac_handler(const vector_t *strvec) continue; } +#if HAVE_DECL_FRA_SUPPRESS_IFGROUP if (!strcmp(strvec_slot(strvec, i), "group")) { uint32_t group; if (!find_rttables_group(strvec_slot(strvec, ++i), &group)) { @@ -581,6 +582,7 @@ vrrp_vmac_handler(const vector_t *strvec) current_vrrp->vmac_group = group; continue; } +#endif if (!strcmp(strvec_slot(strvec, i), "name")) { /* Skip over "name" */ @@ -695,6 +697,7 @@ vrrp_ipvlan_handler(const vector_t *strvec) continue; } +#if HAVE_DECL_FRA_SUPPRESS_IFGROUP if (!strcmp(strvec_slot(strvec, i), "group")) { uint32_t group; if (!find_rttables_group(strvec_slot(strvec, ++i), &group)) { @@ -705,6 +708,7 @@ vrrp_ipvlan_handler(const vector_t *strvec) current_vrrp->vmac_group = group; continue; } +#endif if (!strcmp(strvec_slot(strvec, i), "name")) { i++; diff --git a/lib/rttables.c b/lib/rttables.c index 5ea52cc23d..f66e4a8b79 100644 --- a/lib/rttables.c +++ b/lib/rttables.c @@ -322,11 +322,13 @@ find_rttables_dsfield(const char *name, uint8_t *id) return ret; } +#if HAVE_DECL_FRA_SUPPRESS_IFGROUP && defined _WITH_SNMP_VRRP_ bool find_rttables_group(const char *name, uint32_t *id) { return find_entry(name, id, &rt_groups, RT_GROUPS_FILE, NULL, INT32_MAX); } +#endif bool find_rttables_realms(const char *name, uint32_t *id) diff --git a/lib/rttables.h b/lib/rttables.h index 606dfcc1b0..68d060bb91 100644 --- a/lib/rttables.h +++ b/lib/rttables.h @@ -31,7 +31,9 @@ extern void clear_rt_names(void); extern bool find_rttables_table(const char *, uint32_t *); extern bool find_rttables_dsfield(const char *, uint8_t *); extern bool find_rttables_realms(const char *, uint32_t *); +#if HAVE_DECL_FRA_SUPPRESS_IFGROUP && defined _WITH_SNMP_VRRP_ extern bool find_rttables_group(const char *, uint32_t *); +#endif extern bool find_rttables_proto(const char *, uint8_t *); extern bool find_rttables_rtntype(const char *, uint8_t *); extern bool find_rttables_scope(const char *, uint8_t *);