zebra: fix build with --disable-rtadv

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
Igor Ryzhov 2024-01-24 04:35:03 +02:00
parent 8763946ab2
commit 185fd140cf
5 changed files with 32 additions and 4 deletions

View file

@ -143,8 +143,16 @@ static struct frr_signal_t mgmt_signals[] = {
extern const struct frr_yang_module_info frr_staticd_cli_info;
#endif
#if HAVE_BFDD == 0 || defined(HAVE_RTADV)
const char *zebra_features[] = {
#if HAVE_BFDD == 0
const char *zebra_features[] = { "ptm-bfd", NULL };
"ptm-bfd",
#endif
#if defined(HAVE_RTADV)
"ipv6-router-advertisements",
#endif
NULL
};
#endif
/*
@ -154,7 +162,7 @@ const char *zebra_features[] = { "ptm-bfd", NULL };
*/
const struct frr_yang_module_info zebra_info = {
.name = "frr-zebra",
#if HAVE_BFDD == 0
#if HAVE_BFDD == 0 || defined(HAVE_RTADV)
.features = zebra_features,
#endif
.ignore_cfg_cbs = true,

View file

@ -81,6 +81,11 @@ module frr-zebra {
"Initial revision.";
}
feature ipv6-router-advertisements {
description
"Support for IPv6 Router Advertisements.";
}
feature ptm-bfd {
description
"Using an external PTM daemon that implements BFD.";
@ -2270,6 +2275,7 @@ module frr-zebra {
}
}
container ipv6-router-advertisements {
if-feature "ipv6-router-advertisements";
description
"Support for IPv6 Router Advertisements.";
leaf send-advertisements {

View file

@ -10,14 +10,22 @@
#include "libfrr.h"
#include "zebra_nb.h"
#if HAVE_BFDD == 0 || defined(HAVE_RTADV)
const char *features[] = {
#if HAVE_BFDD == 0
const char *features[] = { "ptm-bfd", NULL };
"ptm-bfd",
#endif
#if defined(HAVE_RTADV)
"ipv6-router-advertisements",
#endif
NULL
};
#endif
/* clang-format off */
const struct frr_yang_module_info frr_zebra_info = {
.name = "frr-zebra",
#if HAVE_BFDD == 0
#if HAVE_BFDD == 0 || defined(HAVE_RTADV)
.features = features,
#endif
.nodes = {
@ -561,6 +569,7 @@ const struct frr_yang_module_info frr_zebra_info = {
.modify = lib_interface_zebra_evpn_mh_uplink_modify,
}
},
#if defined(HAVE_RTADV)
{
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/send-advertisements",
.cbs = {
@ -720,6 +729,7 @@ const struct frr_yang_module_info frr_zebra_info = {
.destroy = lib_interface_zebra_ipv6_router_advertisements_rdnss_rdnss_address_lifetime_destroy,
}
},
#endif /* defined(HAVE_RTADV) */
#if HAVE_BFDD == 0
{
.xpath = "/frr-interface:lib/interface/frr-zebra:zebra/ptm-enable",

View file

@ -184,6 +184,7 @@ int lib_interface_zebra_evpn_mh_df_preference_modify(
struct nb_cb_modify_args *args);
int lib_interface_zebra_evpn_mh_bypass_modify(struct nb_cb_modify_args *args);
int lib_interface_zebra_evpn_mh_uplink_modify(struct nb_cb_modify_args *args);
#if defined(HAVE_RTADV)
int lib_interface_zebra_ipv6_router_advertisements_send_advertisements_modify(
struct nb_cb_modify_args *args);
int lib_interface_zebra_ipv6_router_advertisements_max_rtr_adv_interval_modify(
@ -252,6 +253,7 @@ int lib_interface_zebra_ipv6_router_advertisements_dnssl_dnssl_domain_lifetime_m
struct nb_cb_modify_args *args);
int lib_interface_zebra_ipv6_router_advertisements_dnssl_dnssl_domain_lifetime_destroy(
struct nb_cb_destroy_args *args);
#endif /* defined(HAVE_RTADV) */
#if HAVE_BFDD == 0
int lib_interface_zebra_ptm_enable_modify(struct nb_cb_modify_args *args);
#endif

View file

@ -2478,6 +2478,7 @@ int lib_interface_zebra_evpn_mh_uplink_modify(struct nb_cb_modify_args *args)
return NB_OK;
}
#if defined(HAVE_RTADV)
/*
* XPath: /frr-interface:lib/interface/frr-zebra:zebra/ipv6-router-advertisements/send-advertisements
*/
@ -3199,6 +3200,7 @@ int lib_interface_zebra_ipv6_router_advertisements_dnssl_dnssl_domain_lifetime_d
return NB_OK;
}
#endif /* defined(HAVE_RTADV) */
#if HAVE_BFDD == 0
/*