aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/fib/mpls_fib.h
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2024-04-19 09:10:46 +0000
committerBeno�t Ganne <bganne@cisco.com>2024-06-03 12:22:10 +0000
commit5f694322a925200d698db1025e721842e80d4b38 (patch)
treeccaca75a2ec3df8c7da47d58a7bacb4b4a0163c3 /src/vnet/fib/mpls_fib.h
parent05b0307962519bcc61853f3810efddf90cab9217 (diff)
fib: set the value of the sw_if_index for DROP route
Type: fix fib_api_path_decode() is utilized by the IP route API call to translate the path from the API to the fib_route_path_t structure. The ip_route_add_del_handler_t function initializes the fib_route_path_t structure to zeros, consequently setting the sw_if_index value to 0, which is a valid value in VPP. Typically, the default VRF (Virtual Routing and Forwarding) has a local interface at index 0, leading to normal functionality. However, a custom VRF table without any interface will result in a crash. The issue arises because the DROP route in fib_api_path_decode() does not override the sw_if_index value with the one provided in vl_api_fib_path_t. Subsequently, when this sw_if_index is attempted to be resolved in the VRF table where the interface does not exist, it leads to a crash. This patch addresses the problem by setting the sw_if_index of fib_route_path_t to the sw_if_index value of the API path. To reproduce the issue, please remove the fix and run the following command: make test-debug TEST=test_ip4.TestIPv4RouteLookup.test_exact_match Change-Id: I5d72e91e5c701e749a92873941bee7b7b5eabd41 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet/fib/mpls_fib.h')
0 files changed, 0 insertions, 0 deletions