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.
When
pbr_nht_delete_individual_nexthop()
removes nexthop, the pbr common is indeed updated when the last one is being updated or deleted as comment said in this function. But if there are more than one nexthops in one pbr-map instance, it wrongly doesn't remove theip rule
which is previously sent to the kernel. In this case, it will lead to the disorder of rule in kernel.With this configuration: ( The nexthops of "1300::3" and "3.3.3.3" is in "vrf1", and not in vrf "default".)
Now all is okay.
Then, trigger
pbr_nht_delete_individual_nexthop()
by:Now
ip rule/ip route
will be in disorder/inconsistent status. For example,ip rule
is with table 10001, but there is empty things inip table 10001
.