summaryrefslogtreecommitdiff
path: root/zebra/zapi_msg.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-10-24 09:49:40 -0400
committerDonald Sharp <sharpd@nvidia.com>2022-11-04 13:34:27 -0400
commitca2b3467830877ca279a7bad6d8c2d162fa45e8e (patch)
treea8fff8d87c37c95bf2dc1f002ee945222de31525 /zebra/zapi_msg.c
parentf3c6dd49f47d4d092a43d55d4af87521a323b3ae (diff)
*: Add ability to encode / decode resilence down zapi
At this point add abilty for the encode/decode of the resilience down ZAPI to zebra. Just hookup sharpd at this point in time. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/zapi_msg.c')
-rw-r--r--zebra/zapi_msg.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index 4d7ad21bf3..a3db53f296 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -1874,6 +1874,10 @@ static int zapi_nhg_decode(struct stream *s, int cmd, struct zapi_nhg *api_nhg)
if (cmd == ZEBRA_NHG_DEL)
goto done;
+ STREAM_GETW(s, api_nhg->resilience.buckets);
+ STREAM_GETL(s, api_nhg->resilience.idle_timer);
+ STREAM_GETL(s, api_nhg->resilience.unbalanced_timer);
+
/* Nexthops */
STREAM_GETW(s, api_nhg->nexthop_num);
@@ -1998,6 +2002,8 @@ static void zread_nhg_add(ZAPI_HANDLER_ARGS)
nhe->nhg.nexthop = nhg->nexthop;
nhg->nexthop = NULL;
+ nhe->nhg.nhgr = api_nhg.resilience;
+
if (bnhg) {
nhe->backup_info = bnhg;
bnhg = NULL;