]> git.proxmox.com Git - mirror_frr.git/blobdiff - staticd/static_zebra.c
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / staticd / static_zebra.c
index cb36304473f65903d659309a15683ed671d789e2..f220b476fbbddbfae03a824813a03e48da188655 100644 (file)
@@ -1,21 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  * Zebra connect code.
  * Copyright (C) 2018 Cumulus Networks, Inc.
  *               Donald Sharp
- *
- * 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.
- *
- * 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
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 #include <zebra.h>
 
@@ -211,6 +198,9 @@ static int static_zebra_nexthop_update(ZAPI_CALLBACK_ARGS)
                return 1;
        }
 
+       if (zclient->bfd_integration)
+               bfd_nht_update(&matched, &nhr);
+
        if (matched.family == AF_INET6)
                afi = AFI_IP6;
 
@@ -441,6 +431,9 @@ extern void static_zebra_route_add(struct static_path *pn, bool install)
                api_nh = &api.nexthops[nh_num];
                if (nh->nh_vrf_id == VRF_UNKNOWN)
                        continue;
+               /* Skip next hop which peer is down. */
+               if (nh->path_down)
+                       continue;
 
                api_nh->vrf_id = nh->nh_vrf_id;
                if (nh->onlink)
@@ -545,6 +538,7 @@ void static_zebra_init(void)
        zclient->zebra_connected = zebra_connected;
 
        static_nht_hash_init(static_nht_hash);
+       static_bfd_initialize(zclient, master);
 }
 
 /* static_zebra_stop used by tests/lib/test_grpc.cpp */