From 34fa08703676b24b8d982b4717a769d68b2df2f4 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 22 Jun 2018 10:33:42 -0400 Subject: [PATCH] zebra: Re-add tracking of redistribution events Somewhere along the way we lost the tracking of redistribution events. Put them back in. Signed-off-by: Donald Sharp --- zebra/zapi_msg.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c index 853a83373d..6946c33acc 100644 --- a/zebra/zapi_msg.c +++ b/zebra/zapi_msg.c @@ -521,6 +521,7 @@ int zsend_redistribute_route(int cmd, struct zserv *client, struct prefix *p, struct zapi_nexthop *api_nh; struct nexthop *nexthop; int count = 0; + afi_t afi; memset(&api, 0, sizeof(api)); api.vrf_id = re->vrf_id; @@ -528,6 +529,24 @@ int zsend_redistribute_route(int cmd, struct zserv *client, struct prefix *p, api.instance = re->instance; api.flags = re->flags; + afi = family2afi(p->family); + switch (afi) { + case AFI_IP: + if (cmd == ZEBRA_REDISTRIBUTE_ROUTE_ADD) + client->redist_v4_add_cnt++; + else + client->redist_v4_del_cnt++; + break; + case AFI_IP6: + if (cmd == ZEBRA_REDISTRIBUTE_ROUTE_ADD) + client->redist_v6_add_cnt++; + else + client->redist_v6_del_cnt++; + break; + default: + break; + } + /* Prefix. */ api.prefix = *p; if (src_p) { -- 2.39.5