diff options
| author | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2022-10-06 17:26:57 +0200 | 
|---|---|---|
| committer | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2022-10-18 16:08:24 +0200 | 
| commit | 537b8b13f9a56c15e34f226365805b9cbbea8f2a (patch) | |
| tree | d1ba4ddabeffb42edc4984c51fc107ed3f500f04 /zebra/zebra_srv6_vty.c | |
| parent | 34e3711fb49212bc643a238d8a1e285a2fd5980d (diff) | |
zebra: Do not allow SRv6 func_bit_len > 20
Currently, the SID transposition algorithm implemented in bgpd handles
incorrectly the SRv6 locators with function length greater than 20 bits.
To prevent issues, we currently limit the function length to 20 bits.
This limit will be removed when the bgpd SID transposition is fixed.
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
Diffstat (limited to 'zebra/zebra_srv6_vty.c')
| -rw-r--r-- | zebra/zebra_srv6_vty.c | 13 | 
1 files changed, 13 insertions, 0 deletions
diff --git a/zebra/zebra_srv6_vty.c b/zebra/zebra_srv6_vty.c index e00f974e77..9adfc6550a 100644 --- a/zebra/zebra_srv6_vty.c +++ b/zebra/zebra_srv6_vty.c @@ -318,6 +318,19 @@ DEFPY (locator_prefix,  		return CMD_WARNING_CONFIG_FAILED;  	} +	/* +	 * Currently, the SID transposition algorithm implemented in bgpd +	 * handles incorrectly the SRv6 locators with function length greater +	 * than 20 bits. To prevent issues, we currently limit the function +	 * length to 20 bits. +	 * This limit will be removed when the bgpd SID transposition is fixed. +	 */ +	if (func_bit_len > 20) { +		vty_out(vty, +			"%% currently func_bit_len > 20 is not supported\n"); +		return CMD_WARNING_CONFIG_FAILED; +	} +  	locator->block_bits_length = block_bit_len;  	locator->node_bits_length = node_bit_len;  	locator->function_bits_length = func_bit_len;  | 
