summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_route.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index fa64d3dd62..cf3b8e8bde 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -3934,12 +3934,16 @@ static void bgp_soft_reconfig_table(struct peer *peer, afi_t afi, safi_t safi,
if (ain->peer != peer)
continue;
- struct bgp_path_info *pi =
- bgp_node_get_bgp_path_info(rn);
+ struct bgp_path_info *pi;
uint32_t num_labels = 0;
mpls_label_t *label_pnt = NULL;
struct bgp_route_evpn evpn;
+ for (pi = bgp_node_get_bgp_path_info(rn); pi;
+ pi = pi->next)
+ if (pi->peer == peer)
+ break;
+
if (pi && pi->extra)
num_labels = pi->extra->num_labels;
if (num_labels)