]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: use fib nexthops for pseudowires
authorMark Stapp <mjs@voltanet.io>
Mon, 1 Jun 2020 16:24:14 +0000 (12:24 -0400)
committerMark Stapp <mjs@voltanet.io>
Tue, 7 Jul 2020 17:14:01 +0000 (13:14 -0400)
Make sure to use the installed/fib set of nexthops
when capturing info about pseudowire updates.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
zebra/zebra_dplane.c

index cc9868b92de36573c28502b06e23bffc3af678f0..68e068cb6591259fc5760884ae55c18cb143f662 100644 (file)
@@ -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);
                }
        }