From dd4dd1d909287f328b8770f8d73a24b4fd85be4d Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 16 Mar 2021 22:28:29 -0400 Subject: [PATCH] bgpd: If we have a SAFI conflict do not allow labeled unicast to reset 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 (cherry picked from commit 0f3ac8198ac082cc86b1e544054da0cb1dcfed36) --- bgpd/bgpd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 3d4ef7cab5..4d3812bf60 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -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)) -- 2.39.5