From 24b3c59c2d371ce17a8c7cc65c1939a4abc971fa Mon Sep 17 00:00:00 2001 From: Ryoga Saito Date: Thu, 9 Sep 2021 09:21:30 +0000 Subject: [PATCH] zebra: copy nexthop_srv6 in nexthop_set_resolved Current implementation doesn't copy nexthop_srv6. This causes unexpected behavior when receiving SID information and nexthop isn't onlink.t Signed-off-by: Ryoga Saito --- zebra/zebra_nhg.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index ce11264383..aed4f8ca8d 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -1773,6 +1773,14 @@ static struct nexthop *nexthop_set_resolved(afi_t afi, nexthop_add_labels(resolved_hop, label_type, num_labels, labels); + if (nexthop->nh_srv6) { + nexthop_add_srv6_seg6local(resolved_hop, + nexthop->nh_srv6->seg6local_action, + &nexthop->nh_srv6->seg6local_ctx); + nexthop_add_srv6_seg6(resolved_hop, + &nexthop->nh_srv6->seg6_segs); + } + resolved_hop->rparent = nexthop; _nexthop_add(&nexthop->resolved, resolved_hop); -- 2.39.5