forked from Mirror/frr
staticd: zebra, modify nexthop to support multiple srv6 segs SIDs
Adapt the nexthop from 1 to multiple srv6 seg SIDs Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
This commit is contained in:
parent
21eb1449c7
commit
35028f833c
|
@ -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++)
|
for (i = 0; i < api_nh->label_num; i++)
|
||||||
api_nh->labels[i] = nh->snh_label.label[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++;
|
nh_num++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue