diff options
Diffstat (limited to 'staticd/static_zebra.c')
| -rw-r--r-- | staticd/static_zebra.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c index de07ad8ef3..316247adb3 100644 --- a/staticd/static_zebra.c +++ b/staticd/static_zebra.c @@ -313,6 +313,7 @@ static bool static_zebra_nht_get_prefix(const struct static_nexthop *nh, } assertf(0, "BUG: someone forgot to add nexthop type %u", nh->type); + return false; } void static_zebra_nht_register(struct static_nexthop *nh, bool reg) @@ -440,6 +441,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) @@ -544,6 +548,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 */ |
