Don't install rules for the primary interface #98
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.
Issue #, if available: #97
Description of changes:
There's an expectation that containers on the docker0 bridge can communicate with the host on its primary interface's address. The practical way to accomplish that, without knowing additional information about the additional interfaces and/or prefixes involved, is to avoid creating a rule matching traffic from the primary interface's addresses and instead let the main table handle that traffic.
Routing traffic from the primary interface via the main table was in place prior to version 2.4.0, which regressed.
The tradeoff in fixing this is that traffic that specifically binds to one of device-number-0's addresses will be routed via the "wrong" table when trying to reach addresses reachable via a secondary ENI. The expected behavior in a VPC is that it it's routed via device-number-0, but according to entries in the main table it will be routed via the secondary ENI as the most direct path to the destination. This is consistent with Amazon Linux 2's routing behavior, and for that reason is considered desirable here as well.
Fixes: 0a57c62 ("Route configuration simplification")
Fixes: #97
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.