datapath/linux/route: Fix Delete#40653
Merged
pchaigno merged 1 commit intocilium:mainfrom Jul 22, 2025
Merged
Conversation
Since the deletion of routes with the Nexthop or the Local field set fails (see the current comment in the code), the Delete function cannot call the getNetlinkRoute helper. But since it is not using that helper, Delete lacks the copy of several important fields in the route to be deleted, like the source, the priority, the protocol and so on. This can lead to errors while deleting stale route inserted with the Upsert function. As an example, let's consider the deletion of the routes added in the IPSec specific routing table in multi-pool IPAM mode (to be added soon in a subsequent PR). In that case, with the previous version of the Delete function, the following error is returned: `msg="Unable to delete the IPsec route IN from the host routing table" error="no such process"` and the stale route is not deleted. The commit fixes the Delete implementation to copy additional fields from the route.Route internal representation. Signed-off-by: Fabio Falzoi <[email protected]>
pchaigno
approved these changes
Jul 22, 2025
Member
pchaigno
left a comment
There was a problem hiding this comment.
LGTM. However I don't think this matches backport criterias for v1.16.
Member
|
/test |
Member
Author
|
Tracked ci-e2e-upgrade failure in #40659, rerunning |
4 tasks
10 tasks
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Since the deletion of routes with the Nexthop or the Local field set fails (see the current comment in the code), the Delete function cannot call the getNetlinkRoute helper. But since it is not using that helper, Delete lacks the copy of several important fields in the route to be deleted, like the source, the priority, the protocol and so on. This can lead to errors while deleting stale route inserted with the Upsert function. As an example, let's consider the deletion of the routes added in the IPSec specific routing table in multi-pool IPAM mode (to be added soon in a subsequent PR). In that case, with the previous version of the Delete function, the following error is returned:
msg="Unable to delete the IPsec route IN from the host routing table" error="no such process"and the stale route is not deleted.
The commit fixes the Delete implementation to copy additional fields from the route.Route internal representation.
Related: #40460