diff options
| author | Hiroki Shirokura <slank.dev@gmail.com> | 2020-12-17 23:43:01 +0900 |
|---|---|---|
| committer | Mark Stapp <mjs@voltanet.io> | 2021-06-02 10:24:48 -0400 |
| commit | 76fb7ae4dea7604afe1185df91de941d9e3ce58f (patch) | |
| tree | 136d629c32287630a959bc687294baa9c5964d9c /zebra/zapi_msg.c | |
| parent | 2aa01034f3c437e076cf12f1ea4e4b7b5b6b9075 (diff) | |
zebra: ZEBRA_ROUTE_ADD supports seg6 route (step3)
With this patch, zclient can intall seg6 rotues when
they set properties "nh_seg6_segs" on struct nexthop
and set ZEBRA_FLAG_SEG6_ROUTE on zapi_route's flag.
Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
Diffstat (limited to 'zebra/zapi_msg.c')
| -rw-r--r-- | zebra/zapi_msg.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c index fa6a4cfca7..25c51e2227 100644 --- a/zebra/zapi_msg.c +++ b/zebra/zapi_msg.c @@ -1783,6 +1783,14 @@ static bool zapi_read_nexthops(struct zserv *client, struct prefix *p, &api_nh->seg6local_ctx); } + if (CHECK_FLAG(flags, ZEBRA_FLAG_SEG6_ROUTE) + && api_nh->type != NEXTHOP_TYPE_BLACKHOLE) { + if (IS_ZEBRA_DEBUG_RECV) + zlog_debug("%s: adding seg6", __func__); + + nexthop_add_seg6(nexthop, &api_nh->seg6_segs); + } + if (IS_ZEBRA_DEBUG_RECV) { labelbuf[0] = '\0'; nhbuf[0] = '\0'; |
