From: Donald Sharp Date: Fri, 22 Jun 2018 14:33:42 +0000 (-0400) Subject: zebra: Re-add tracking of redistribution events X-Git-Tag: frr-6.1-dev~218^2~2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=34fa08703676b24b8d982b4717a769d68b2df2f4;p=matthieu%2Ffrr.git 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 --- 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) {