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:
- 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.
- 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.
The function is called in
fib_entry_src_action_path_add,fib_entry_src_action_path_removeandfib_entry_src_action_path_swapand works on route paths (rpaths) that are provided to these functions.There are 2 problems with this function:
ATTACHEDflag and if it is not removes it without considering previous paths.fib_entry_src_action_path_removethe 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
ATTACHEDflag even when existing attached paths still contributes. Alsoremoving a attached path, does not clear the
ATTACHEDflag and cause a stale flag to be set.