]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: permit to get statistics for other bgp safis
authorPhilippe Guibert <philippe.guibert@6wind.com>
Fri, 14 Feb 2020 14:25:36 +0000 (15:25 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 31 Mar 2020 12:38:15 +0000 (14:38 +0200)
safis that use a route distinguisher in bgp tables, and as such
introduce a two level hierarchy on the bgp table, must be made available
to statistics too.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd/bgp_route.c

index 522fb16b02756da7f37f16dd1120e189f9a185fd..687f969c3f91d2da947bb194bbf2b8270fb0ac31 100644 (file)
@@ -11209,7 +11209,9 @@ static int bgp_table_stats_walker(struct thread *t)
        ts->counts[BGP_STATS_MAXBITLEN] = space;
 
        for (rn = top; rn; rn = bgp_route_next(rn)) {
-               if (ts->table->safi == SAFI_MPLS_VPN) {
+               if (ts->table->safi == SAFI_MPLS_VPN ||
+                   ts->table->safi == SAFI_ENCAP ||
+                   ts->table->safi == SAFI_EVPN) {
                        struct bgp_table *table;
 
                        table = bgp_node_get_bgp_table_info(rn);