staticd: fix route installation on same next hop with inactive routes #18361
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #18321.
When two routes have the same inactive next hop the second (third and so on) route installation won't happen, because a global next hop reference already exists. Add the code to install the route in case global next hop entry already exists and the next hop is inactive.
(Credits: Changes done by Rafael Zalamena - Just opening the PR for him as he is on vacation)