diff options
| author | anlan_cs <anlan_cs@126.com> | 2024-10-31 22:44:05 +0800 |
|---|---|---|
| committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2024-11-05 15:22:23 +0000 |
| commit | 3cb4dcda5cd000d3108db67414f83e58638d62d0 (patch) | |
| tree | a17b6270218e695514fae33ddd2479abb0464af4 | |
| parent | 02f4fef5ffd88923c63f219b9a118221ea800d80 (diff) | |
zebra: fix missing kernel routes
The `rib_update_handle_kernel_route_down_possibility()` didn't consider
the kernel routes ( blackhole ) without interface. When some other
interfaces are down, these kernel routes will be wrongly removed.
Signed-off-by: anlan_cs <anlan_cs@126.com>
(cherry picked from commit 44a82da405879b1318f046dc67893934b57cbf37)
| -rw-r--r-- | zebra/zebra_rib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 4c70013701..752f8282df 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -4490,7 +4490,7 @@ rib_update_handle_kernel_route_down_possibility(struct route_node *rn, struct interface *ifp = if_lookup_by_index(nexthop->ifindex, nexthop->vrf_id); - if (ifp && if_is_up(ifp)) { + if ((ifp && if_is_up(ifp)) || nexthop->type == NEXTHOP_TYPE_BLACKHOLE) { alive = true; break; } |
