Vendor in Libnetwork changes#41604
Merged
Merged
Conversation
Bring in changes from moby/libnetwork#2572 to moby Signed-off-by: Arko Dasgupta <[email protected]>
arkodg
force-pushed
the
bump-libnetwork-ipv6nat
branch
from
October 29, 2020 21:32
4f9e1f6 to
1623e6b
Compare
Contributor
Author
|
cc @bboehmke |
Member
|
Seeing a failure that may be relevant; |
thaJeztah
reviewed
Nov 2, 2020
Comment on lines
-398
to
+445
| func Exists(table Table, chain string, rule ...string) bool { | ||
| return exists(false, table, chain, rule...) | ||
| func (iptable IPTable) Exists(table Table, chain string, rule ...string) bool { |
Member
There was a problem hiding this comment.
Looks like this is causing the failure
Contributor
There was a problem hiding this comment.
To reduce code duplication the code of the iptables was reused for ip6tables.
A simple change in the integration-cli/docker_cli_daemon_test.go should fix this:
diff --git a/integration-cli/docker_cli_daemon_test.go b/integration-cli/docker_cli_daemon_test.go
index d5fa41c29e..4b578def25 100644
--- a/integration-cli/docker_cli_daemon_test.go
+++ b/integration-cli/docker_cli_daemon_test.go
@@ -945,12 +945,14 @@ func (s *DockerDaemonSuite) TestDaemonLinksIpTablesRulesWhenLinkAndUnlink(c *tes
sourceRule := []string{"-i", bridgeName, "-o", bridgeName, "-p", "tcp", "-s", childIP, "--sport", "80", "-d", parentIP, "-j", "ACCEPT"}
destinationRule := []string{"-i", bridgeName, "-o", bridgeName, "-p", "tcp", "-s", parentIP, "--dport", "80", "-d", childIP, "-j", "ACCEPT"}
- if !iptables.Exists("filter", "DOCKER", sourceRule...) || !iptables.Exists("filter", "DOCKER", destinationRule...) {
+
+ iptable := iptables.GetIptable(iptables.IPv4)
+ if !iptable.Exists("filter", "DOCKER", sourceRule...) || !iptable.Exists("filter", "DOCKER", destinationRule...) {
c.Fatal("Iptables rules not found")
}
s.d.Cmd("rm", "--link", "parent/http")
- if iptables.Exists("filter", "DOCKER", sourceRule...) || iptables.Exists("filter", "DOCKER", destinationRule...) {
+ if iptable.Exists("filter", "DOCKER", sourceRule...) || iptable.Exists("filter", "DOCKER", destinationRule...) {
c.Fatal("Iptables rules should be removed when unlink")
}Edit: fixed diff
Signed-off-by: Arko Dasgupta <[email protected]>
arkodg
force-pushed
the
bump-libnetwork-ipv6nat
branch
from
November 3, 2020 23:04
d2775ce to
dfc2d77
Compare
AkihiroSuda
approved these changes
Nov 4, 2020
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.
Bring in changes from moby/libnetwork#2572 to moby
Signed-off-by: Arko Dasgupta [email protected]