From 5dd47f73c299f45e6fa4935634527694f1c9c37c Mon Sep 17 00:00:00 2001 From: Trey Aspelund Date: Thu, 4 Mar 2021 02:05:56 +0000 Subject: [PATCH] bgpd: fix bgp statistics for l2vpn evpn 'show bgp l2vpn evpn statistics' was returning 0 for all stats because bgp_table_stats_walker bailed out if afi != AFI_IP or AFI_IP6. Add case condition to catch AFI_L2VPN. Signed-off-by: Trey Aspelund --- bgpd/bgp_route.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 8a24212dcd..d160f4b8e1 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -11559,6 +11559,9 @@ static int bgp_table_stats_walker(struct thread *t) case AFI_IP6: space = IPV6_MAX_BITLEN; break; + case AFI_L2VPN: + space = EVPN_ROUTE_PREFIXLEN; + break; default: return 0; } -- 2.39.5