summaryrefslogtreecommitdiff
path: root/zebra/zapi_msg.c
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2023-12-04 07:31:14 -0500
committerGitHub <noreply@github.com>2023-12-04 07:31:14 -0500
commit6be9452e50c1e1ec39f85196304df67367ada8ca (patch)
tree3067ec40b97a02e16487b0fc41774d453c530ed0 /zebra/zapi_msg.c
parentdac0f0d2ff44166f38c74089de8317eac461f052 (diff)
parent0c34fa2cc6354633dfb64275d1e37c273f3b95d0 (diff)
Merge pull request #14885 from pguibert6WIND/misc_nhg_fixes
various nexthop group fixes
Diffstat (limited to 'zebra/zapi_msg.c')
-rw-r--r--zebra/zapi_msg.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index 98268dafa6..f7293d8f0f 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -1973,6 +1973,8 @@ static void zread_nhg_del(ZAPI_HANDLER_ARGS)
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)
@@ -1981,7 +1983,7 @@ 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) {
@@ -2039,6 +2041,12 @@ static void zread_nhg_add(ZAPI_HANDLER_ARGS)
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)