Update route if acquired time changes#441
Merged
rsmarples merged 10 commits intoNetworkConfiguration:masterfrom Feb 5, 2025
Merged
Update route if acquired time changes#441rsmarples merged 10 commits intoNetworkConfiguration:masterfrom
rsmarples merged 10 commits intoNetworkConfiguration:masterfrom
Conversation
Records last time route was acquired so we can determine if change needs to be pushed out to network. Allows for route expiry to be updated by RouterAdvertisement for example.
rsmarples
reviewed
Jan 24, 2025
Contributor
Author
|
I have tested this fix with a 600s RA renewal with 1800s lifetime. Every 10 minutes or so we see the RA come in, and I see the route lifetime get re-updated to 1800s each time. |
rsmarples
requested changes
Feb 2, 2025
Gate route lifetime to linux only route expiry is calculated when we recieve RA, so when it is updated, and difference between new and old is greater than 30s, push the update to the system.
Everything about IPv6 is lifetime, not expiry. Only linux routes have an expiry.
Member
|
@ColinMcInnes I've pushed some changes. I finally got around to testing this on a Fedora box and spotted some issues which are now resolved. Please review my changes and comment if you agree or not. This cosmetic change is proving a lot of trouble and has revealed a very poor implementation which I've noted in comments. |
ColinMcInnes
commented
Feb 3, 2025
OK, this is not consistent at all! In the kernel RTA_EXPIRES is only set for IPv4 multicast routes when emitting route changes and only read for IPv6 routes when userland makes route changes. We cannot set this for non IPv6 routes currently. To make it worse, we set a UINT32 for IPv6 routes but read a UINT64 for IPv4 multicast routes. To make this even more totally bonkers, the expiry we set for the IPv6 route can be read back via RTA_CACHEINE rta_expires but we need to convert to divide it by hz.
e51efc1 to
a0b96bc
Compare
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.
If a route gets an update (say from an RA), consider it changed so new expiry gets pushed out to system.
Resolves #428