Skip to content

Commit

Permalink
lib: fix copy srte_color from zapi_nexthop structure
Browse files Browse the repository at this point in the history
When switching from nexthop to zapi_nexthop, the srte color
is copied. Do the same in reverse.

Fixes: 31f937f ("lib, zebra: Add SR-TE policy infrastructure to zebra")

Signed-off-by: Philippe Guibert <[email protected]>
(cherry picked from commit 49bc1b6)
  • Loading branch information
pguibert6WIND authored and mergify[bot] committed Jun 12, 2024
1 parent 3fbd709 commit 9be48cb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/zclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -2171,6 +2171,7 @@ int zapi_nexthop_from_nexthop(struct zapi_nexthop *znh,
znh->weight = nh->weight;
znh->ifindex = nh->ifindex;
znh->gate = nh->gate;
znh->srte_color = nh->srte_color;

if (CHECK_FLAG(nh->flags, NEXTHOP_FLAG_ONLINK))
SET_FLAG(znh->flags, ZAPI_NEXTHOP_FLAG_ONLINK);
Expand Down

0 comments on commit 9be48cb

Please sign in to comment.