* is pending (BGP_NODE_FIB_INSTALL_PENDING), do not advertise the
* route
*/
- advertise = bgp_check_advertise(bgp, dest);
+ advertise = bgp_check_advertise(bgp, dest, safi);
if (selected) {
if (subgroup_announce_check(dest, selected, subgrp, p, &attr,
* in FIB, then it is advertised
*/
if (advertise) {
- if (!bgp_check_withdrawal(bgp, dest)) {
+ if (!bgp_check_withdrawal(bgp, dest, safi)) {
struct attr *adv_attr =
bgp_attr_intern(&attr);
/* If suppress fib is enabled and route not installed
* in FIB, skip the route
*/
- if (!bgp_check_advertise(bgp, dest))
+ if (!bgp_check_advertise(bgp, dest, safi))
continue;
match = 0;
/* If suppress fib is enabled and route not installed
* in FIB, do not update the aggregate route
*/
- if (!bgp_check_advertise(bgp, pi->net))
+ if (!bgp_check_advertise(bgp, pi->net, safi))
return;
child = bgp_node_get(table, p);
}
}
-static inline bool bgp_check_advertise(struct bgp *bgp, struct bgp_dest *dest)
+static inline bool bgp_check_advertise(struct bgp *bgp, struct bgp_dest *dest,
+ safi_t safi)
{
+ if (!bgp_fibupd_safi(safi))
+ return true;
+
return (!(BGP_SUPPRESS_FIB_ENABLED(bgp) &&
CHECK_FLAG(dest->flags, BGP_NODE_FIB_INSTALL_PENDING) &&
(!bgp_option_check(BGP_OPT_NO_FIB))));
* This function assumes that bgp_check_advertise was already returned
* as good to go.
*/
-static inline bool bgp_check_withdrawal(struct bgp *bgp, struct bgp_dest *dest)
+static inline bool bgp_check_withdrawal(struct bgp *bgp, struct bgp_dest *dest,
+ safi_t safi)
{
struct bgp_path_info *pi, *selected = NULL;
- if (!BGP_SUPPRESS_FIB_ENABLED(bgp))
+ if (!bgp_fibupd_safi(safi) || !BGP_SUPPRESS_FIB_ENABLED(bgp))
return false;
for (pi = bgp_dest_get_bgp_path_info(dest); pi; pi = pi->next) {
{
struct update_subgroup *subgrp;
struct bgp *bgp;
+ safi_t safi;
subgrp = EVENT_ARG(thread);
if (bgp_debug_update(NULL, NULL, subgrp->update_group, 0))
subgrp->v_coalesce = 0;
bgp = SUBGRP_INST(subgrp);
subgroup_announce_route(subgrp);
-
+ safi = SUBGRP_SAFI(subgrp);
/* While the announce_route() may kick off the route advertisement timer
* for
* announce, this is the method currently employed to trigger the EOR.
*/
if (!bgp_update_delay_active(SUBGRP_INST(subgrp)) &&
- !(BGP_SUPPRESS_FIB_ENABLED(bgp))) {
+ !(bgp_fibupd_safi(safi) && BGP_SUPPRESS_FIB_ENABLED(bgp))) {
+
struct peer_af *paf;
struct peer *peer;
* the flag PEER_STATUS_ADV_DELAY which will allow
* more routes to be sent in the update message
*/
- if (BGP_SUPPRESS_FIB_ENABLED(bgp)) {
+ if (bgp_fibupd_safi(safi) &&
+ BGP_SUPPRESS_FIB_ENABLED(bgp)) {
adv_peer = PAF_PEER(paf);
if (!bgp_adv_fifo_count(
&subgrp->sync->withdraw))
/* If suppress fib is enabled, the route will be advertised when
* FIB status is received
*/
- if (!bgp_check_advertise(bgp, dest))
+ if (!bgp_check_advertise(bgp, dest, safi))
return;
update_group_af_walk(bgp, afi, safi, group_announce_route_walkcb, &ctx);