vpp icon indicating copy to clipboard operation
vpp copied to clipboard

fib: fib_entry_flags_update wrong behavior

Open m-varasteh opened this issue 2 months ago • 1 comments

The function is called in fib_entry_src_action_path_add, fib_entry_src_action_path_remove and fib_entry_src_action_path_swap and works on route paths (rpaths) that are provided to these functions. There are 2 problems with this function:

  1. The function works on a per route path basis. In the loop over rpaths, if path is attached it sets the ATTACHED flag and if it is not removes it without considering previous paths.
  2. I believe that the function should be called after these functions are done and work on final path-set. For example in fib_entry_src_action_path_remove the rpaths are the paths that are to be removed and we should not set flags based on them.

For a detailed example, adding a non-attached could clear ATTACHED flag even when existing attached paths still contributes. Also removing a attached path, does not clear the ATTACHED flag and cause a stale flag to be set.

m-varasteh avatar Oct 15 '25 06:10 m-varasteh