]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospfd/ospf_bfd.c
lib: enforce vrf_name_to_id by returning default_vrf when name is null
[mirror_frr.git] / ospfd / ospf_bfd.c
index 0f7fb50778dfad543742a72dbf591011347bca93..594735a08f8021919240b920308d250e1ff82bcd 100644 (file)
@@ -290,17 +290,21 @@ void ospf_bfd_info_nbr_create(struct ospf_interface *oi,
 void ospf_bfd_write_config(struct vty *vty, struct ospf_if_params *params)
 
 {
+#if HAVE_BFDD == 0
        struct bfd_info *bfd_info;
+#endif /* ! HAVE_BFDD */
 
        if (!params->bfd_info)
                return;
 
+#if HAVE_BFDD == 0
        bfd_info = (struct bfd_info *)params->bfd_info;
 
        if (CHECK_FLAG(bfd_info->flags, BFD_FLAG_PARAM_CFG))
                vty_out(vty, " ip ospf bfd %d %d %d\n", bfd_info->detect_mult,
                        bfd_info->required_min_rx, bfd_info->desired_min_tx);
        else
+#endif /* ! HAVE_BFDD */
                vty_out(vty, " ip ospf bfd\n");
 }
 
@@ -308,7 +312,7 @@ void ospf_bfd_write_config(struct vty *vty, struct ospf_if_params *params)
  * ospf_bfd_show_info - Show BFD info structure
  */
 void ospf_bfd_show_info(struct vty *vty, void *bfd_info, json_object *json_obj,
-                       uint8_t use_json, int param_only)
+                       bool use_json, int param_only)
 {
        if (param_only)
                bfd_show_param(vty, (struct bfd_info *)bfd_info, 1, 0, use_json,
@@ -322,7 +326,7 @@ void ospf_bfd_show_info(struct vty *vty, void *bfd_info, json_object *json_obj,
  * ospf_bfd_interface_show - Show the interface BFD configuration.
  */
 void ospf_bfd_interface_show(struct vty *vty, struct interface *ifp,
-                            json_object *json_interface_sub, uint8_t use_json)
+                            json_object *json_interface_sub, bool use_json)
 {
        struct ospf_if_params *params;
 
@@ -373,7 +377,12 @@ DEFUN (ip_ospf_bfd,
        return CMD_SUCCESS;
 }
 
-DEFUN (ip_ospf_bfd_param,
+#if HAVE_BFDD > 0
+DEFUN_HIDDEN(
+#else
+DEFUN(
+#endif /* HAVE_BFDD */
+       ip_ospf_bfd_param,
        ip_ospf_bfd_param_cmd,
        "ip ospf bfd (2-255) (50-60000) (50-60000)",
        "IP Information\n"
@@ -407,14 +416,21 @@ DEFUN (ip_ospf_bfd_param,
 
 DEFUN (no_ip_ospf_bfd,
        no_ip_ospf_bfd_cmd,
+#if HAVE_BFDD > 0
+       "no ip ospf bfd",
+#else
        "no ip ospf bfd [(2-255) (50-60000) (50-60000)]",
+#endif /* HAVE_BFDD */
        NO_STR
        "IP Information\n"
        "OSPF interface commands\n"
        "Disables BFD support\n"
+#if HAVE_BFDD == 0
        "Detect Multiplier\n"
        "Required min receive interval\n"
-       "Desired min transmit interval\n")
+       "Desired min transmit interval\n"
+#endif /* !HAVE_BFDD */
+)
 {
        VTY_DECLVAR_CONTEXT(interface, ifp);
        struct ospf_if_params *params;