Skip to content

fib: fib_entry_flags_update wrong behavior #3637

@m-varasteh

Description

@m-varasteh

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions