From 0024ea8ecd5b0546abb0d9116ef439044f7d6306 Mon Sep 17 00:00:00 2001 From: Mark Stapp Date: Mon, 1 Jun 2020 12:24:14 -0400 Subject: zebra: use fib nexthops for pseudowires Make sure to use the installed/fib set of nexthops when capturing info about pseudowire updates. Signed-off-by: Mark Stapp --- zebra/zebra_dplane.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'zebra') diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c index cc9868b92..68e068cb6 100644 --- a/zebra/zebra_dplane.c +++ b/zebra/zebra_dplane.c @@ -2043,6 +2043,7 @@ static int dplane_ctx_pw_init(struct zebra_dplane_ctx *ctx, struct route_table *table; struct route_node *rn; struct route_entry *re; + const struct nexthop_group *nhg; if (IS_ZEBRA_DEBUG_DPLANE_DETAIL) zlog_debug("init dplane ctx %s: pw '%s', loc %u, rem %u", @@ -2093,10 +2094,11 @@ static int dplane_ctx_pw_init(struct zebra_dplane_ctx *ctx, break; } - if (re) + if (re) { + nhg = rib_get_fib_nhg(re); copy_nexthops(&(ctx->u.pw.nhg.nexthop), - re->nhe->nhg.nexthop, NULL); - + nhg->nexthop, NULL); + } route_unlock_node(rn); } } -- cgit v1.2.3