Skip to content

Commit

Permalink
bgpd: copy nexthop_srv6 in nexthop_set_resolved
Browse files Browse the repository at this point in the history
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 <contact@proelbtn.com>
  • Loading branch information
proelbtn committed Sep 9, 2021
1 parent f334c88 commit ebcc8fb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions zebra/zebra_nhg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit ebcc8fb

Please sign in to comment.