]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: fix bgp statistics for l2vpn evpn
authorTrey Aspelund <taspelund@nvidia.com>
Thu, 4 Mar 2021 02:05:56 +0000 (02:05 +0000)
committerIgor Ryzhov <iryzhov@nfware.com>
Wed, 24 Mar 2021 12:13:22 +0000 (15:13 +0300)
'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 <taspelund@nvidia.com>
bgpd/bgp_route.c

index 8a24212dcdd0473ed02169135b090fbff392c9b7..d160f4b8e19023ccff4ea362b7ed1f18e1fe07f0 100644 (file)
@@ -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;
        }