Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
| ... | ... |
@@ -945,12 +945,13 @@ func (s *DockerDaemonSuite) TestDaemonLinksIpTablesRulesWhenLinkAndUnlink(c *tes |
| 945 | 945 |
|
| 946 | 946 |
sourceRule := []string{"-i", bridgeName, "-o", bridgeName, "-p", "tcp", "-s", childIP, "--sport", "80", "-d", parentIP, "-j", "ACCEPT"}
|
| 947 | 947 |
destinationRule := []string{"-i", bridgeName, "-o", bridgeName, "-p", "tcp", "-s", parentIP, "--dport", "80", "-d", childIP, "-j", "ACCEPT"}
|
| 948 |
- if !iptables.Exists("filter", "DOCKER", sourceRule...) || !iptables.Exists("filter", "DOCKER", destinationRule...) {
|
|
| 948 |
+ iptable := iptables.GetIptable(iptables.IPv4) |
|
| 949 |
+ if !iptable.Exists("filter", "DOCKER", sourceRule...) || !iptable.Exists("filter", "DOCKER", destinationRule...) {
|
|
| 949 | 950 |
c.Fatal("Iptables rules not found")
|
| 950 | 951 |
} |
| 951 | 952 |
|
| 952 | 953 |
s.d.Cmd("rm", "--link", "parent/http")
|
| 953 |
- if iptables.Exists("filter", "DOCKER", sourceRule...) || iptables.Exists("filter", "DOCKER", destinationRule...) {
|
|
| 954 |
+ if iptable.Exists("filter", "DOCKER", sourceRule...) || iptable.Exists("filter", "DOCKER", destinationRule...) {
|
|
| 954 | 955 |
c.Fatal("Iptables rules should be removed when unlink")
|
| 955 | 956 |
} |
| 956 | 957 |
|