zsend_nhg_notify(api_nhg.proto, client->instance,
client->session_id, api_nhg.id,
ZAPI_NHG_REMOVE_FAIL);
+ /* Stats */
+ client->nhg_del_cnt++;
}
static void zread_nhg_add(ZAPI_HANDLER_ARGS)
struct zapi_nhg api_nhg = {};
struct nexthop_group *nhg = NULL;
struct nhg_backup_info *bnhg = NULL;
- struct nhg_hash_entry *nhe;
+ struct nhg_hash_entry *nhe, *nhe_tmp;
s = msg;
if (zapi_nhg_decode(s, hdr->command, &api_nhg) < 0) {
nexthop_group_delete(&nhg);
zebra_nhg_backup_free(&bnhg);
+ /* Stats */
+ nhe_tmp = zebra_nhg_lookup_id(api_nhg.id);
+ if (nhe_tmp)
+ client->nhg_upd8_cnt++;
+ else
+ client->nhg_add_cnt++;
}
static void zread_route_add(ZAPI_HANDLER_ARGS)
0, client->redist_v4_del_cnt);
vty_out(vty, "Redist:v6 %-12u%-12u%-12u\n", client->redist_v6_add_cnt,
0, client->redist_v6_del_cnt);
+ vty_out(vty, "NHG %-12u%-12u%-12u\n", client->nhg_add_cnt,
+ client->nhg_upd8_cnt, client->nhg_del_cnt);
vty_out(vty, "VRF %-12u%-12u%-12u\n", client->vrfadd_cnt, 0,
client->vrfdel_cnt);
vty_out(vty, "Connected %-12u%-12u%-12u\n", client->ifadd_cnt, 0,