}
/* Register for conditional routes polling timer */
- thread_add_timer(bm->master, bgp_conditional_adv_timer, bgp,
- bgp->condition_check_period, &bgp->t_condition_check);
+ if (!thread_is_scheduled(bgp->t_condition_check))
+ thread_add_timer(bm->master, bgp_conditional_adv_timer, bgp, 0,
+ &bgp->t_condition_check);
}
void bgp_conditional_adv_disable(struct peer *peer, afi_t afi, safi_t safi)
filter->advmap.update_type = UPDATE_TYPE_ADVERTISE;
bgp_conditional_adv_enable(peer, afi, safi);
}
+
+ /* Process peer route updates. */
+ peer_on_policy_change(peer, afi, safi, 1);
}
-/* Set advertise-map to the peer but do not process peer route updates here. *
- * Hold filter changes until the conditional routes polling thread is called *
- * AS we need to advertise/withdraw prefixes (in advertise-map) based on the *
- * condition (exist-map/non-exist-map) and routes(specified in condition-map) *
- * in BGP table. So do not call peer_on_policy_change() here, only create *
- * polling timer thread, update filters and increment condition_filter_count.
- */
+/* Set advertise-map to the peer. */
int peer_advertise_map_set(struct peer *peer, afi_t afi, safi_t safi,
const char *advertise_name,
struct route_map *advertise_map,
__func__, peer->host,
get_afi_safi_str(afi, safi, false));
- peer_on_policy_change(peer, afi, safi, 1);
return 0;
}
zlog_debug("%s: Send normal update to %s for %s ",
__func__, member->host,
get_afi_safi_str(afi, safi, false));
-
- peer_on_policy_change(member, afi, safi, 1);
}
return 0;