]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: If we have a SAFI conflict do not allow labeled unicast to reset
authorDonald Sharp <sharpd@nvidia.com>
Wed, 17 Mar 2021 02:28:29 +0000 (22:28 -0400)
committerChristian Poessinger <christian@poessinger.com>
Wed, 17 Mar 2021 07:02:52 +0000 (08:02 +0100)
If we have a SAFI conflict, ie we are trying to activate safi's
UNICAST and LABELED_UNICAST at the same time, we should not
cause bestpath to be rerun and we should not try to put
labels on everything.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 0f3ac8198ac082cc86b1e544054da0cb1dcfed36)

bgpd/bgpd.c

index 3d4ef7cab5de912a72832f6d17ee93610fcfc062..4d3812bf60dc670c02b67c7001609117b24ba8d3 100644 (file)
@@ -2081,7 +2081,7 @@ int peer_activate(struct peer *peer, afi_t afi, safi_t safi)
 
        /* If this is the first peer to be activated for this
         * afi/labeled-unicast recalc bestpaths to trigger label allocation */
-       if (safi == SAFI_LABELED_UNICAST
+       if (ret != BGP_ERR_PEER_SAFI_CONFLICT && safi == SAFI_LABELED_UNICAST
            && !bgp->allocate_mpls_labels[afi][SAFI_UNICAST]) {
 
                if (BGP_DEBUG(zebra, ZEBRA))