From d537287a48a88c1f4ba6c5df59fc701ae3045723 Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Thu, 27 Oct 2022 18:58:39 +0200 Subject: [PATCH] lib,zebra: Send SRv6 locator flags over the ZAPI In this commit, we extend the ZAPI to support encoding and decoding the locator flags contained in the messages exchanged between zebra and the routing daemons. Signed-off-by: Carmine Scarpitta --- lib/zclient.c | 2 ++ zebra/zapi_msg.c | 1 + 2 files changed, 3 insertions(+) diff --git a/lib/zclient.c b/lib/zclient.c index 8ec82ab7bb..5f6fcee2e3 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -1088,6 +1088,7 @@ int zapi_srv6_locator_chunk_encode(struct stream *s, stream_putc(s, c->node_bits_length); stream_putc(s, c->function_bits_length); stream_putc(s, c->argument_bits_length); + stream_putc(s, c->flags); return 0; } @@ -1109,6 +1110,7 @@ int zapi_srv6_locator_chunk_decode(struct stream *s, STREAM_GETC(s, c->node_bits_length); STREAM_GETC(s, c->function_bits_length); STREAM_GETC(s, c->argument_bits_length); + STREAM_GETC(s, c->flags); return 0; stream_failure: diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c index 761ba789b8..583f1b7d54 100644 --- a/zebra/zapi_msg.c +++ b/zebra/zapi_msg.c @@ -2709,6 +2709,7 @@ int zsend_srv6_manager_get_locator_chunk_response(struct zserv *client, chunk.keep = 0; chunk.proto = client->proto; chunk.instance = client->instance; + chunk.flags = loc->flags; zclient_create_header(s, ZEBRA_SRV6_MANAGER_GET_LOCATOR_CHUNK, vrf_id); zapi_srv6_locator_chunk_encode(s, &chunk); -- 2.39.5