]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: fix aggregate route best path select
authorChirag Shah <chirag@nvidia.com>
Fri, 19 May 2023 04:49:03 +0000 (21:49 -0700)
committerChirag Shah <chirag@nvidia.com>
Fri, 19 May 2023 21:45:38 +0000 (14:45 -0700)
In ebgp+ ibgp deployment aggregate summary-only route
selected path should always be locally originated
summary route.
When aggregate route summary-only config is removed
The selected path is iBGP peer as its lower cost
Upon reconfiguring aggregate route summary-only,
the locally originated is not selected due to
always choosing first path attribute and bailing
out as no change in route update.

Ticket:#3467890
Issue:3467890
Testing Done:

Config:
------
TORC11(config-router)#router bgp
TORC11(config-router)# address-family ipv4 unicast
TORC11(config-router-af)# aggregate-address 184.123.0.0/16
        summary-only
TORC11(config-router-af)# no aggregate-address 184.123.0.0/16
        summary-only
TORC11(config-router-af)# aggregate-address 184.123.0.0/16
        summary-only

Before fix:
-----------
*> 184.123.0.0/16   ::(TORC11)               0         32768 i
*                   uplink1                                0 4435 5546 i
*                   uplink2                                0 4435 5546 i
* i                 peerlink-3               0    100      0 i

After fix:
----------
*> 184.123.0.0/16   ::(TORC11)               0         32768 i
* i                 peerlink-3               0    100      0 i
*                   uplink2                                0 4435 5546 i
*                   uplink1                                0 4435 5546 i

Signed-off-by: Chirag Shah <chirag@nvidia.com>
bgpd/bgp_route.c

index 4e4dce84fe7a0e6e2df353b607115ae964b13bc5..43b5a3fd09531fa257e961dfaeb4fd56585ccc9c 100644 (file)
@@ -7477,8 +7477,8 @@ static void bgp_aggregate_install(
                 * If the aggregate information has not changed
                 * no need to re-install it again.
                 */
-               if (bgp_aggregate_info_same(orig, origin, aspath, community,
-                                           ecommunity, lcommunity)) {
+               if (pi && bgp_aggregate_info_same(pi, origin, aspath, community,
+                                                 ecommunity, lcommunity)) {
                        bgp_dest_unlock_node(dest);
 
                        if (aspath)