-
Notifications
You must be signed in to change notification settings - Fork 85
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
netlink add ecmp route #66
Conversation
The default route will be added for each connected network, so when you would try to use two networks it would fail because the default route was already added. While we could ignore eexist error this is not what we want. If we only have one route and disconnect the network with the default route we will loose internet connectivity. To best way is to have each network create the default route. This can be done by not setting the NLM_F_EXCL flag for the netlink request. Also see this CNI bridge plugin PR which does the same there: containernetworking/plugins#615 Signed-off-by: Paul Holzinger <[email protected]>
@@ -1,14 +1,21 @@ | |||
use futures::stream::TryStreamExt; | |||
use futures::StreamExt; |
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.
are we using this import anywhere. I am not able to see in the diff.
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.
Yes I it need for let mut response = match handle.clone().request(req)
, do not ask me why.
Also the linter fails with unused imports so we should be safe.
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.
ah i see call to request returns a future Stream
LGTM. Just couple of nits. |
LGTM |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: flouthoc, Luap99 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The default route will be added for each connected network, so when you
would try to use two networks it would fail because the default route
was already added. While we could ignore eexist error this is not what
we want.
If we only have one route and disconnect the network with the default
route we will loose internet connectivity. To best way is to have each
network create the default route. This can be done by not setting the
NLM_F_EXCL flag for the netlink request.
Also see this CNI bridge plugin PR which does the same there: containernetworking/plugins#615