summaryrefslogtreecommitdiff
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r--zebra/zebra_rib.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 24c51e485f..fcac3328c9 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -730,10 +730,9 @@ void zebra_rib_evaluate_rn_nexthops(struct route_node *rn, uint32_t seq)
if (IS_ZEBRA_DEBUG_NHT_DETAILED)
zlog_debug(
- "%s(%u):%pRN has Nexthop(%pFX) Type: %s depending on it, evaluating %u:%u",
- zvrf_name(zvrf), zvrf_id(zvrf),
- rn, p, rnh_type2str(rnh->type), seq,
- rnh->seqno);
+ "%s(%u):%pRN has Nexthop(%pFX) depending on it, evaluating %u:%u",
+ zvrf_name(zvrf), zvrf_id(zvrf), rn, p,
+ seq, rnh->seqno);
/*
* If we have evaluated this node on this pass
@@ -755,8 +754,8 @@ void zebra_rib_evaluate_rn_nexthops(struct route_node *rn, uint32_t seq)
}
rnh->seqno = seq;
- zebra_evaluate_rnh(zvrf, family2afi(p->family), 0,
- rnh->type, p);
+ zebra_evaluate_rnh(zvrf, family2afi(p->family), 0, p,
+ rnh->safi);
}
rn = rn->parent;
@@ -3891,14 +3890,16 @@ void rib_update(enum rib_update_event event)
{
struct rib_update_ctx *ctx;
- ctx = rib_update_ctx_init(0, event);
+ if (thread_is_scheduled(t_rib_update_threads[event]))
+ return;
+ ctx = rib_update_ctx_init(0, event);
ctx->vrf_all = true;
- if (!thread_add_event(zrouter.master, rib_update_handler, ctx, 0,
- &t_rib_update_threads[event]))
- rib_update_ctx_fini(&ctx); /* Already scheduled */
- else if (IS_ZEBRA_DEBUG_EVENT)
+ thread_add_event(zrouter.master, rib_update_handler, ctx, 0,
+ &t_rib_update_threads[event]);
+
+ if (IS_ZEBRA_DEBUG_EVENT)
zlog_debug("%s: Scheduled VRF (ALL), event %s", __func__,
rib_update_event2str(event));
}