mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Append icc related iptables rules, not INSERT
Signed-off-by: Gosuke Miyashita <gosukenator@gmail.com>
This commit is contained in:
parent
ccbb93e1cd
commit
90a8e45604
1 changed files with 2 additions and 2 deletions
|
@ -340,7 +340,7 @@ func setupIPTables(addr net.Addr, icc, ipmasq bool) error {
|
|||
|
||||
if !iptables.Exists(iptables.Filter, "FORWARD", dropArgs...) {
|
||||
logrus.Debugf("Disable inter-container communication")
|
||||
if output, err := iptables.Raw(append([]string{"-I", "FORWARD"}, dropArgs...)...); err != nil {
|
||||
if output, err := iptables.Raw(append([]string{"-A", "FORWARD"}, dropArgs...)...); err != nil {
|
||||
return fmt.Errorf("Unable to prevent intercontainer communication: %s", err)
|
||||
} else if len(output) != 0 {
|
||||
return fmt.Errorf("Error disabling intercontainer communication: %s", output)
|
||||
|
@ -351,7 +351,7 @@ func setupIPTables(addr net.Addr, icc, ipmasq bool) error {
|
|||
|
||||
if !iptables.Exists(iptables.Filter, "FORWARD", acceptArgs...) {
|
||||
logrus.Debugf("Enable inter-container communication")
|
||||
if output, err := iptables.Raw(append([]string{"-I", "FORWARD"}, acceptArgs...)...); err != nil {
|
||||
if output, err := iptables.Raw(append([]string{"-A", "FORWARD"}, acceptArgs...)...); err != nil {
|
||||
return fmt.Errorf("Unable to allow intercontainer communication: %s", err)
|
||||
} else if len(output) != 0 {
|
||||
return fmt.Errorf("Error enabling intercontainer communication: %s", output)
|
||||
|
|
Loading…
Add table
Reference in a new issue