- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 4.1k
 
network: Fix IPv6 PreferredSource routes #11375
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
Conversation
We're about to need it to be later in the file for the next commit. Moving it now means that when we change it in the next commit, it's not intermingled with the move. No functional change intended. Signed-off-by: Daniel Axtens <dja@axtens.net>
| 
           Please provide a testcase for the issue in test/test-network/.  | 
    
| 
           cc @ssahani  | 
    
| 
           overall looks ok Please provide the test case so that it helps us track the issue.  | 
    
| 
           Hi, Thanks for the feedback - I have added a new commit with a test case. Regards,  | 
    
| 
           I confirm that this actually fixes the provided test case, but unfortunately, breaks other route or routing policy related tests.  | 
    
| 
           OK, I will look in to that. I did see some failures in the test suite, but I thought they were localised to my machine because some of the tests were failing before the commit as well, and the CI tests passed. I will investigate further and revise the patches.  | 
    
| 
           If I understand correctly, when RA is enabled but no RA exists, then it takes  Is it necessary to wait for RA to be configured?  | 
    
| 
           Before this PR, even if   | 
    
| 
           Yeah, by changing the below sleep time to 15sec,  
  | 
    
| 
           Yes, I think your analysis is right. I think it might be possible to reorder the tests in link_check_ready() so as to get the routes installed earlier; I'll have a go at that and let you know how I go.  | 
    
| 
           @ssahani Do you have any comments?  | 
    
If an IPv6 route is added with a source address that is still tentative, the kernel will refuse to install it. Previously, once we sent the messages to the kernel to add the addresses, we would immediately proceed to add the routes. The addresses would usually still be tentative at this point, so adding static IPv6 routes was broken - see issue systemd#5882. Now, only begin to configure routes once the addresses are ready, by restructuring the state machine, and tracking when addresses are ready, not just added. Fixes: systemd#5882 Signed-off-by: Daniel Axtens <dja@axtens.net>
The test is a bit messy because it must be done on a device that enforces a tentative state for IPv6 addresses, and it appears that the dummy device does not. So we use a bond instead. Signed-off-by: Daniel Axtens <dja@axtens.net>
| 
           So I've re-ordered link_check_ready() so that the slow link-local addressing checks are done towards the end. As far as I can see, nothing that is configured earlier can sensibly depend on the link local addresses, and the tests seem to pass within a reasonable time period now.  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
If an IPv6 route is added with a source address that is still
tentative, the kernel will refuse to install it.
Previously, once we sent the messages to the kernel to add the
addresses, we would immediately proceed to add the routes. The
addresses would usually still be tentative at this point, so
adding static IPv6 routes was broken - see issue #5882.
Now, only begin to configure routes once the addresses are ready,
by restructuring the state machine, and tracking when addresses are
ready, not just added.
Fixes: #5882