#include "zebra_vxlan.h"
#include "zebra_mlag.h"
-struct zebra_router zrouter;
+struct zebra_router zrouter = {
+ .multipath_num = MULTIPATH_NUM,
+};
static inline int
zebra_router_table_entry_compare(const struct zebra_router_table *e1,
return zrt->table;
}
-unsigned long zebra_router_score_proto(uint8_t proto, unsigned short instance)
-{
- struct zebra_router_table *zrt;
- unsigned long cnt = 0;
-
- RB_FOREACH (zrt, zebra_router_table_head, &zrouter.tables) {
- if (zrt->ns_id != NS_DEFAULT)
- continue;
- cnt += rib_score_proto_table(proto, instance, zrt->table);
- }
- return cnt;
-}
-
void zebra_router_show_table_summary(struct vty *vty)
{
struct zebra_router_table *zrt;
{
struct zebra_router_table *zrt, *tmp;
- RB_FOREACH_SAFE (zrt, zebra_router_table_head, &zrouter.tables, tmp) {
- RB_REMOVE(zebra_router_table_head, &zrouter.tables, zrt);
+ RB_FOREACH_SAFE (zrt, zebra_router_table_head, &zrouter.tables, tmp)
zebra_router_free_table(zrt);
- }
work_queue_free_and_null(&zrouter.ribq);
meta_queue_free(zrouter.mq);
{
zrouter.sequence_num = 0;
- zrouter.rtm_table_default = 0;
zrouter.packets_to_process = ZEBRA_ZAPI_PACKETS_TO_PROCESS;
zebra_vxlan_init();