mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 11:18:43 +00:00
zebra: Ensure SRv6 SID length does not exceed 128
According to RFC 8986, the SRv6 SID length cannot exceed 128 bits. This commit ensures that the condition `block_len + node_len + function_len + arg_len <= 128` is satisfied when a new SRv6 locator is created. Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
This commit is contained in:
parent
b3c5e11c8d
commit
34e3711fb4
@ -311,6 +311,13 @@ DEFPY (locator_prefix,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (prefix->prefixlen + func_bit_len + 0 > 128) {
|
||||||
|
vty_out(vty,
|
||||||
|
"%% prefix-len + function-len + arg-len (%ld) cannot be greater than 128\n",
|
||||||
|
prefix->prefixlen + func_bit_len + 0);
|
||||||
|
return CMD_WARNING_CONFIG_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
locator->block_bits_length = block_bit_len;
|
locator->block_bits_length = block_bit_len;
|
||||||
locator->node_bits_length = node_bit_len;
|
locator->node_bits_length = node_bit_len;
|
||||||
locator->function_bits_length = func_bit_len;
|
locator->function_bits_length = func_bit_len;
|
||||||
|
Loading…
Reference in New Issue
Block a user