mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 21:10:28 +00:00
zebra: add default SRv6 Function length
Add default SRv6 Function Length for usecases like SRv6 L3VPN. The default value (16) comes from the default Function length for SRv6 L3VPN in BGPd. Signed-off-by: Ryoga Saito <ryoga.saito@linecorp.com>
This commit is contained in:
parent
0f926d9141
commit
85521aaabd
@ -281,7 +281,14 @@ DEFPY (locator_prefix,
|
||||
struct srv6_locator_chunk *chunk = NULL;
|
||||
struct listnode *node = NULL;
|
||||
|
||||
if (prefix->prefixlen != 64) {
|
||||
vty_out(vty,
|
||||
"%% Invalid argument: Unsupported locator format\n");
|
||||
return CMD_WARNING_CONFIG_FAILED;
|
||||
}
|
||||
|
||||
locator->prefix = *prefix;
|
||||
func_bit_len = func_bit_len ?: ZEBRA_SRV6_FUNCTION_LENGTH;
|
||||
|
||||
/*
|
||||
* TODO(slankdev): please support variable node-bit-length.
|
||||
@ -298,8 +305,8 @@ DEFPY (locator_prefix,
|
||||
* user should use a pattern of zeros as a filler.
|
||||
* (3) The Node Id portion (LSBs) cannot exceed 24 bits.
|
||||
*/
|
||||
locator->block_bits_length = prefix->prefixlen - 24;
|
||||
locator->node_bits_length = 24;
|
||||
locator->block_bits_length = ZEBRA_SRV6_LOCATOR_BLOCK_LENGTH;
|
||||
locator->node_bits_length = ZEBRA_SRV6_LOCATOR_NODE_LENGTH;
|
||||
locator->function_bits_length = func_bit_len;
|
||||
locator->argument_bits_length = 0;
|
||||
|
||||
|
@ -20,6 +20,10 @@
|
||||
#ifndef _ZEBRA_SRV6_VTY_H
|
||||
#define _ZEBRA_SRV6_VTY_H
|
||||
|
||||
#define ZEBRA_SRV6_LOCATOR_BLOCK_LENGTH 40
|
||||
#define ZEBRA_SRV6_LOCATOR_NODE_LENGTH 24
|
||||
#define ZEBRA_SRV6_FUNCTION_LENGTH 16
|
||||
|
||||
extern void zebra_srv6_vty_init(void);
|
||||
|
||||
#endif /* _ZEBRA_SRV6_VTY_H */
|
||||
|
Loading…
Reference in New Issue
Block a user