summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2024-01-24 03:35:03 +0100
committerIgor Ryzhov <iryzhov@nfware.com>2024-01-28 22:28:40 +0100
commit185fd140cf74068b49d1539676a50205feb92096 (patch)
treed0756a9f9b01aa996fccef012c28af03475dd644
parentzebra: convert PTM configuration to NB (diff)
downloadfrr-185fd140cf74068b49d1539676a50205feb92096.tar.xz
frr-185fd140cf74068b49d1539676a50205feb92096.zip
zebra: fix build with --disable-rtadv
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
-rw-r--r--mgmtd/mgmt_main.c12
-rw-r--r--yang/frr-zebra.yang6
-rw-r--r--zebra/zebra_nb.c14
-rw-r--r--zebra/zebra_nb.h2
-rw-r--r--zebra/zebra_nb_config.c2
5 files changed, 32 insertions, 4 deletions
diff --git a/mgmtd/mgmt_main.c b/mgmtd/mgmt_main.c
index 68a748951..8a0e25903 100644
--- a/mgmtd/mgmt_main.c
+++ b/mgmtd/mgmt_main.c
@@ -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,
diff --git a/yang/frr-zebra.yang b/yang/frr-zebra.yang
index 689a9c256..72193664d 100644
--- a/yang/frr-zebra.yang
+++ b/yang/frr-zebra.yang
@@ -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 {
diff --git a/zebra/zebra_nb.c b/zebra/zebra_nb.c
index 638507c52..bb63a151e 100644
--- a/zebra/zebra_nb.c
+++ b/zebra/zebra_nb.c
@@ -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",
diff --git a/zebra/zebra_nb.h b/zebra/zebra_nb.h
index 8116e827d..886be0cf8 100644
--- a/zebra/zebra_nb.h
+++ b/zebra/zebra_nb.h
@@ -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
diff --git a/zebra/zebra_nb_config.c b/zebra/zebra_nb_config.c
index 28e48f79f..41f82f5eb 100644
--- a/zebra/zebra_nb_config.c
+++ b/zebra/zebra_nb_config.c
@@ -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
/*