Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pimd: Fix missing pimreg interface (backport #13617) #14558

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Oct 10, 2023

This is an automatic backport of pull request #13617 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

`pimregX` of specific vrf can be deleted from kernel after this vrf
is deleted.  However, then `pimdregX` will never come back to
kernel after adding it ( the same vrf ) back.  That is to say, it exists
only in daemon, but not in kernel.

The root cause is this `pimregX` is not really deleted for its special
usage, and `pim_if_create_pimreg()` wants reusing it.

I have tried 4 solutions:
1. Remove the `configured` flag of `pimregX`, allow its deletion.
A few timers still use `pimregX` after its deletion.  So, not adopted.
2. Remove `pimregX` by vrf hook in `pim_instance_terminate()`.
It has no vrf id there.  So, not adopted.
3. Reuse `pimregX` in `pim_if_create_pimreg()`.
If `pim->regiface->info` is true, then reuse old `pimregX` and only call
`pim_if_add_vif()` to install it into kernel.  But at that time, it maybe
is in default VRF.  The `pim_zebra_interface_set_master()` doesn't work
at that time because it shouldn't wait there for its changing into
correct VRF.  So, not adopted.
4. Not reuse it.
If `pim->regiface->info` is true, there must have been pim instance with
VRF deleted and created before.  Actually delele old one in
`pim_if_create_pimreg()`, then recreate new one.

Finally, this PR adopted the fourth solution.

Fixes #13454

Signed-off-by: anlan_cs <[email protected]>
(cherry picked from commit b016b55)
@frrbot frrbot bot added the pim label Oct 10, 2023
@Jafaral Jafaral merged commit f08f6f4 into stable/9.0 Oct 11, 2023
@mergify mergify bot deleted the mergify/bp/stable/9.0/pr-13617 branch October 11, 2023 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants