diff options
| author | Russ White <russ@riw.us> | 2023-09-20 23:09:35 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-20 23:09:35 -0400 |
| commit | 90d19d1489c7237acaad7dfa79af2080301ad60d (patch) | |
| tree | 59d903742e50c7d36edf22cfcd98cff736fbf063 /staticd/static_zebra.c | |
| parent | 0c9aabe76040dff04c76b127f92087236a623451 (diff) | |
| parent | 9f3ceabd490a4ab90dd8e8b74b4d16117edd8c10 (diff) | |
Merge pull request #14089 from dmytroshytyi-6WIND/srv6_multiple_segs_sids
bgpd,doc,lib,sharpd,staticd,yang,zebra: SRv6 multiple segs SIDs
Diffstat (limited to 'staticd/static_zebra.c')
| -rw-r--r-- | staticd/static_zebra.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/staticd/static_zebra.c b/staticd/static_zebra.c index 4f3ccde53d..6abbdadc08 100644 --- a/staticd/static_zebra.c +++ b/staticd/static_zebra.c @@ -499,6 +499,21 @@ extern void static_zebra_route_add(struct static_path *pn, bool install) for (i = 0; i < api_nh->label_num; i++) api_nh->labels[i] = nh->snh_label.label[i]; } + if (nh->snh_seg.num_segs) { + int i; + + api_nh->seg6local_action = + ZEBRA_SEG6_LOCAL_ACTION_UNSPEC; + SET_FLAG(api_nh->flags, ZAPI_NEXTHOP_FLAG_SEG6); + SET_FLAG(api.flags, ZEBRA_FLAG_ALLOW_RECURSION); + api.safi = SAFI_UNICAST; + + api_nh->seg_num = nh->snh_seg.num_segs; + for (i = 0; i < api_nh->seg_num; i++) + memcpy(&api_nh->seg6_segs[i], + &nh->snh_seg.seg[i], + sizeof(struct in6_addr)); + } nh_num++; } |
