]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib,zebra: Send SRv6 locator flags over the ZAPI
authorCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Thu, 27 Oct 2022 16:58:39 +0000 (18:58 +0200)
committerCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Sat, 29 Oct 2022 00:07:01 +0000 (02:07 +0200)
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 <carmine.scarpitta@uniroma2.it>
lib/zclient.c
zebra/zapi_msg.c

index 8ec82ab7bb91c5bd0f3def83b7e981e7f3f0af0e..5f6fcee2e3f99ef47958d1de1a5123fc9bf36ba8 100644 (file)
@@ -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:
index 761ba789b87afb1ab3193956ec67432477444a6a..583f1b7d54e57ab54e3c77d19509c7c40ec60fd7 100644 (file)
@@ -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);