]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: fix copy srte_color from zapi_nexthop structure 16206/head
authorPhilippe Guibert <philippe.guibert@6wind.com>
Sun, 17 Dec 2023 20:04:31 +0000 (21:04 +0100)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Wed, 12 Jun 2024 12:41:40 +0000 (12:41 +0000)
When switching from nexthop to zapi_nexthop, the srte color
is copied. Do the same in reverse.

Fixes: 31f937fb43f4 ("lib, zebra: Add SR-TE policy infrastructure to zebra")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
(cherry picked from commit 49bc1b6c21e8da0da82746373a7257aeb2c9fa4a)

lib/zclient.c

index 07c7e5aea8953bfe8855e2c489fdb8a6e0c1b4c9..903a704d4d845619cb80e4a460c7bf267852bf9d 100644 (file)
@@ -1927,6 +1927,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);