From 90a80a85c4a1780aaa0a5dfd8b6af8fff7f49d22 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Sun, 3 May 2020 21:16:45 +0300 Subject: [PATCH] bgpd: Set a proper SAFI for labaled-unicast when looking for scount The problem is that peer_af_array returns NULL when SAFI is changed to unicast. We use unicast table, but peer is created and activated under labeled-unicast, hence we should lookup with a proper SAFI id. Without this patch peer_af_find() returns NULL and we can't show PfxSnt in `show bgp summary`. Signed-off-by: Donatas Abraitis --- bgpd/bgp_vty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 0f09369860..ac5e7e5bf5 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -9066,7 +9066,7 @@ static int bgp_show_summary(struct vty *vty, struct bgp *bgp, int afi, int safi, } } - paf = peer_af_find(peer, afi, pfx_rcd_safi); + paf = peer_af_find(peer, afi, safi); filter = &peer->filter[afi][safi]; count++; -- 2.39.5