diff options
Diffstat (limited to 'zebra/zebra_ns.c')
| -rw-r--r-- | zebra/zebra_ns.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/zebra/zebra_ns.c b/zebra/zebra_ns.c index 192e8ad413..2c7b85e614 100644 --- a/zebra/zebra_ns.c +++ b/zebra/zebra_ns.c @@ -37,6 +37,7 @@ #include "zebra_netns_notify.h" #include "zebra_netns_id.h" #include "zebra_pbr.h" +#include "rib.h" extern struct zebra_privs_t zserv_privs; @@ -162,6 +163,20 @@ struct route_table *zebra_ns_find_table(struct zebra_ns *zns, uint32_t tableid, return NULL; } +unsigned long zebra_ns_score_proto(u_char proto, u_short instance) +{ + struct zebra_ns *zns; + struct zebra_ns_table *znst; + unsigned long cnt = 0; + + zns = zebra_ns_lookup(NS_DEFAULT); + + RB_FOREACH (znst, zebra_ns_table_head, &zns->ns_tables) + cnt += rib_score_proto_table(proto, instance, znst->table); + + return cnt; +} + struct route_table *zebra_ns_get_table(struct zebra_ns *zns, struct zebra_vrf *zvrf, uint32_t tableid, afi_t afi) |
