From: hasso Date: Wed, 23 Feb 2005 14:27:24 +0000 (+0000) Subject: * bgp_route.c: Make reannouncing prefixes with changed attributes X-Git-Tag: frr-2.0-rc1~3168 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=338b3424154af85b0762713796397d3f2345d54f;p=mirror_frr.git * bgp_route.c: Make reannouncing prefixes with changed attributes work again. --- diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog index 009f7f986..29114c89c 100644 --- a/bgpd/ChangeLog +++ b/bgpd/ChangeLog @@ -1,3 +1,8 @@ +2005-02-23 Hasso Tepper + + * bgp_route.c: Make reannouncing prefixes with changed attributes + work again. + 2005-02-02 Akihiro Mizutani * bgp_vty.c: Deprecate "neighbor transparent-as" and "neighbor diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 156120b84..8c8fa528f 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -1098,18 +1098,6 @@ bgp_best_selection (struct bgp *bgp, struct bgp_node *rn, struct bgp_info_pair * new_select = ri; } - if ( (! old_select) || old_select != new_select - || CHECK_FLAG (old_select->flags, BGP_INFO_ATTR_CHANGED)) - { - if (old_select) - UNSET_FLAG (old_select->flags, BGP_INFO_SELECTED); - if (new_select) - { - SET_FLAG (new_select->flags, BGP_INFO_SELECTED); - UNSET_FLAG (new_select->flags, BGP_INFO_ATTR_CHANGED); - } - } - result->old = old_select; result->new = new_select; @@ -1188,6 +1176,14 @@ bgp_process_rsclient (struct bgp *bgp, struct peer *rsclient, if (old_select && old_select == new_select) if (! CHECK_FLAG (old_select->flags, BGP_INFO_ATTR_CHANGED)) continue; + + if (old_select) + UNSET_FLAG (old_select->flags, BGP_INFO_SELECTED); + if (new_select) + { + SET_FLAG (new_select->flags, BGP_INFO_SELECTED); + UNSET_FLAG (new_select->flags, BGP_INFO_ATTR_CHANGED); + } bgp_process_announce_selected (rsclient, new_select, rn, &attr, afi, safi); @@ -1229,6 +1225,15 @@ bgp_process_main (struct bgp *bgp, struct bgp_node *rn, afi_t afi, safi_t safi) } } + if (old_select) + UNSET_FLAG (old_select->flags, BGP_INFO_SELECTED); + if (new_select) + { + SET_FLAG (new_select->flags, BGP_INFO_SELECTED); + UNSET_FLAG (new_select->flags, BGP_INFO_ATTR_CHANGED); + } + + /* Check each BGP peer. */ LIST_LOOP (bgp->peer, peer, nn) {