]> git.puffer.fish Git - mirror/frr.git/commit
zebra: add new CLI args "block-len" and "node-len"
authorCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Fri, 22 Jul 2022 22:29:08 +0000 (00:29 +0200)
committerCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Tue, 18 Oct 2022 13:37:25 +0000 (15:37 +0200)
commit5e04508c92fa62c7ac7a371d5ac49451b41ea85a
treec34ef3843648604aea6db83502136e8f752f3eec
parent272c6d5db128ff7450fe9fcd16c046160594deb3
zebra: add new CLI args "block-len" and "node-len"

In the current implementation, an SRv6 locator only supports the
following structure:
* node-len = 24
* block-len = prefix-len - 24
* function-len = <configurable>
* argument-len = 0

This commit adds two optional arguments to the locator_prefix CLI
command: "node-len" and "block-len". These arguments allows an user to
configure the block length and node length of a SRv6 locator according
to the following logic:
* the node-len + block-len = prefix-len constraint must always be
satisfied;
* if node-len and block-len are both omitted, they are calculated as in
the current implementation (for backward compatibility reasons)
* if node-len is omitted, its value is computed as
prefix-len - block-len
* if block-len is omitted, its value is computed as
prefix-len - node-len

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
zebra/zebra_srv6_vty.c