X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=isisd%2Fisis_bfd.c;h=81976f8dd293d33bf5d4475237122ac8cfb855e1;hb=91d227b7e3cb53ad8fdbcd9d4cff7f0a666918e3;hp=c9d2ea8e21c92c91859d56c67f69a58701819b39;hpb=490a6fc716fb90cde24c47328e305baf0dc2c71d;p=mirror_frr.git diff --git a/isisd/isis_bfd.c b/isisd/isis_bfd.c index c9d2ea8e2..81976f8dd 100644 --- a/isisd/isis_bfd.c +++ b/isisd/isis_bfd.c @@ -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); }