]> git.proxmox.com Git - mirror_frr.git/blobdiff - isisd/isis_bfd.c
lib: enforce vrf_name_to_id by returning default_vrf when name is null
[mirror_frr.git] / isisd / isis_bfd.c
index 59d88e9e3f4ccf4ae9cc9f40e5609160b23dab1c..81976f8dd293d33bf5d4475237122ac8cfb855e1 100644 (file)
@@ -1,19 +1,16 @@
 /*
  * IS-IS Rout(e)ing protocol - BFD support
- *
  * Copyright (C) 2018 Christian Franke
  *
- * This file is part of FreeRangeRouting (FRR)
- *
- * FRR is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2, or (at your option) any
- * later version.
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
  *
- * FRR is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
  *
  * You should have received a copy of the GNU General Public License along
  * with this program; see the file COPYING; if not, write to the Free Software
@@ -71,8 +68,8 @@ static void bfd_adj_event(struct isis_adjacency *adj, struct prefix *dst,
                return;
 
        int old_status = adj->bfd_session->status;
-       adj->bfd_session->status = new_status;
 
+       adj->bfd_session->status = new_status;
        if (old_status == new_status)
                return;
 
@@ -108,6 +105,7 @@ static int isis_bfd_interface_dest_update(int command, struct zclient *zclient,
 
        if (isis->debugs & DEBUG_BFD) {
                char dst_buf[INET6_ADDRSTRLEN];
+
                inet_ntop(AF_INET, &dst_ip.u.prefix4,
                          dst_buf, sizeof(dst_buf));
 
@@ -116,6 +114,7 @@ static int isis_bfd_interface_dest_update(int command, struct zclient *zclient,
        }
 
        struct isis_circuit *circuit = circuit_scan_by_ifp(ifp);
+
        if (!circuit)
                return 0;
 
@@ -236,6 +235,7 @@ static void bfd_handle_adj_up(struct isis_adjacency *adj, int command)
                goto out;
 
        struct list *local_ips = fabricd_ip_addrs(adj->circuit);
+
        if (!local_ips)
                goto out;
 
@@ -296,6 +296,7 @@ void isis_bfd_circuit_cmd(struct isis_circuit *circuit, int command)
 
                        struct listnode *node;
                        struct isis_adjacency *adj;
+
                        for (ALL_LIST_ELEMENTS_RO(adjdb, node, adj))
                                bfd_adj_cmd(adj, command);
                }
@@ -330,14 +331,7 @@ static int bfd_circuit_write_settings(struct isis_circuit *circuit,
        if (!bfd_info)
                return 0;
 
-#if HAVE_BFDD == 0
-       if (CHECK_FLAG(bfd_info->flags, BFD_FLAG_PARAM_CFG)) {
-               vty_out(vty, " %s bfd %" PRIu8 " %" PRIu32 " %" PRIu32 "\n",
-                       PROTO_NAME, bfd_info->detect_mult,
-                       bfd_info->required_min_rx, bfd_info->desired_min_tx);
-       } else
-#endif
-               vty_out(vty, " %s bfd\n", PROTO_NAME);
+       vty_out(vty, " %s bfd\n", PROTO_NAME);
        return 1;
 }