From 002930f7bb68850dbff4e4d71b54ca7814f4cb86 Mon Sep 17 00:00:00 2001 From: Mark Stapp Date: Tue, 5 Oct 2021 15:32:23 -0400 Subject: zebra: add installed nexthop-group id value In some cases, zebra may install a nexthop-group id that is different from the id of the nhe struct attached to a route-entry. This happens for a singleton recursive nexthop, for example, where a route is installed with the resolving nexthop's id. The installed value is the most useful value - that corresponds to information in the kernel on linux/netlink platforms that support nhgs. Display both values if they differ in ascii output, and include both values in the json form. Signed-off-by: Mark Stapp --- zebra/zebra_dplane.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'zebra/zebra_dplane.c') diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c index 4000272544..bf34fb54a9 100644 --- a/zebra/zebra_dplane.c +++ b/zebra/zebra_dplane.c @@ -2448,6 +2448,8 @@ int dplane_ctx_route_init(struct zebra_dplane_ctx *ctx, enum dplane_op_e op, ret = ENOENT; goto done; } + + re->nhe_installed_id = nhe->id; } #endif /* HAVE_NETLINK */ -- cgit v1.2.3