]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: copy nexthop_srv6 in nexthop_set_resolved 9593/head
authorRyoga Saito <contact@proelbtn.com>
Thu, 9 Sep 2021 09:21:30 +0000 (09:21 +0000)
committerRyoga Saito <contact@proelbtn.com>
Fri, 10 Sep 2021 22:30:00 +0000 (22:30 +0000)
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>
zebra/zebra_nhg.c

index ce1126438390238f1cee6d3949f5435e82ef0e2f..aed4f8ca8ddb1eb05035a7ba91c27034dc44640b 100644 (file)
@@ -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);