]> git.puffer.fish Git - mirror/frr.git/commit
zebra: Fixes allowing SRv6 func-bits length 0 18737/head
authorRajasekar Raja <rajasekarr@nvidia.com>
Tue, 29 Apr 2025 22:02:11 +0000 (15:02 -0700)
committerRajasekar Raja <rajasekarr@nvidia.com>
Wed, 30 Apr 2025 14:18:42 +0000 (07:18 -0700)
commite7a7f6a5247e804a4d3ab75f62fef9dfcdc60b18
tree2da4a775aa0b18364e4833923830d93211627122
parent3dd4d417bee4e71ae8ea0cec2a7fc355806d1e19
zebra: Fixes allowing SRv6 func-bits length 0

In current code, when a user inputs function length as 0 for a locator,
the code treats it as a "not configured" value and assigned default (16)
value to it.

This is wrong since the locator default is only to be used when the
function-bits (0-64) is not specified in the locator prefix config.

Fix is to use default value only when the user has not specified the
func-bits

Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
tests/topotests/srv6_locator_custom_bits_length/expected_locators7.json [new file with mode: 0644]
tests/topotests/srv6_locator_custom_bits_length/test_srv6_locator_custom_bits_length.py
zebra/zebra_srv6_vty.c