]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: fix build with --disable-rtadv
authorIgor Ryzhov <iryzhov@nfware.com>
Wed, 24 Jan 2024 02:35:03 +0000 (04:35 +0200)
committerIgor Ryzhov <iryzhov@nfware.com>
Sun, 28 Jan 2024 21:28:40 +0000 (23:28 +0200)
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
mgmtd/mgmt_main.c
yang/frr-zebra.yang
zebra/zebra_nb.c
zebra/zebra_nb.h
zebra/zebra_nb_config.c

index 68a74895117d9492a681c26a2d041f6878669b5d..8a0e259037427b41291f2686d522bc6a76d4626e 100644 (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,
index 689a9c2560e0da884b48a5eaf63785282efb5570..72193664d4e6d9c3d24b4d9c372f19f5b8596af5 100644 (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 {
index 638507c52bfe8cb9e944b4d2518144ad19235b85..bb63a151e2451f56055932c1c73363e68b1d4343 100644 (file)
 #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",
index 8116e827d7400d715cf51598b46dbfbc484bf95a..886be0cf81ef3c1177c89246f5fa58181165e1c6 100644 (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
index 28e48f79f9ca61b18c256070ae2fb70de27f6485..41f82f5ebe63cc3e36f5d8dd252cced7ad744133 100644 (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
 /*