CHECK_FLAG(bmp->targets->afimon[afi][safi], BMP_MON_LOC_RIB)) {
bmp_monitor(bmp, bpi->peer, 0, BMP_PEER_TYPE_LOC_RIB_INSTANCE,
bmp_get_peer_distinguisher(bmp, afi), bn_p, prd,
- bpi->attr, afi, safi, bpi->uptime);
+ bpi->attr, afi, safi, bpi->rib_uptime);
}
if (bpi && CHECK_FLAG(bpi->flags, BGP_PATH_VALID)
bmp_monitor(bmp, peer, 0, BMP_PEER_TYPE_LOC_RIB_INSTANCE,
bmp_get_peer_distinguisher(bmp, afi), &bqe->p, prd,
bpi ? bpi->attr : NULL, afi, safi,
- bpi ? bpi->uptime : monotime(NULL));
+ bpi ? bpi->rib_uptime : monotime(NULL));
written = true;
out:
zlog_info("old_select==NULL %s | new_select==NULL %s",
old_select == NULL ? "YES" : "NO",
new_select == NULL ? "YES" : "NO");
+
+ if (old_select) /* route is not installed in locrib anymore */
+ old_select->rib_uptime = (time_t)(-1L);
+ if (new_select) /* route is installed in locrib from now on */
+ new_select->rib_uptime = bgp_clock();
bool is_withdraw = old_select && !new_select;
hook_call(bgp_route_update, bgp, afi, safi, dest,
new->peer = peer;
new->attr = attr;
new->uptime = monotime(NULL);
+ new->rib_uptime = (time_t)(-1L);
new->net = dest;
return new;
}