Skip to content

Commit

Permalink
fixup pathd, lib, zebra: srte, add distance and metric values in srv6…
Browse files Browse the repository at this point in the history
… segment_list
  • Loading branch information
pguibert6WIND committed Jan 23, 2025
1 parent 15ff1d2 commit 14349bb
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions zebra/zebra_srte.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,20 +99,14 @@ static int process_routes_for_policy(struct zebra_sr_policy *policy, struct zser
stream_putw(s, 0); /* instance - not available */
stream_putc(s, policy->segment_list.distance);
stream_putl(s, policy->segment_list.metric);
*nump = stream_get_endp(s);
stream_putc(s, 0);
stream_putw(s, policy->segment_list.nexthop_resolved_num);

for (i = 0; i < policy->segment_list.nexthop_resolved_num; i++) {
znh = &policy->segment_list.nexthop_resolved[i];
/* add SRTE in znh */
if (CHECK_FLAG(message, ZAPI_MESSAGE_SRTE))
znh->srte_color = policy->color;
ret = zapi_nexthop_encode(s, znh, 0, message);
ret = zapi_nexthop_encode(s, znh, 0, 0);
if (ret < 0)
goto failure;
num++;
}
stream_putc_at(s, *nump, num);
stream_putw_at(s, 0, stream_get_endp(s));

client->nh_last_upd_time = monotime(NULL);
Expand Down

0 comments on commit 14349bb

Please sign in to comment.