Signed-off-by: Jessica Frazelle <jess@docker.com>
| ... | ... |
@@ -731,7 +731,7 @@ func NewDaemonFromDirectory(config *Config, eng *engine.Engine) (*Daemon, error) |
| 731 | 731 |
return nil, fmt.Errorf("You specified --iptables=false with --icc=false. ICC uses iptables to function. Please set --icc or --iptables to true.")
|
| 732 | 732 |
} |
| 733 | 733 |
if !config.EnableIptables && config.EnableIpMasq {
|
| 734 |
- return nil, fmt.Errorf("You specified --iptables=false with --ipmasq=true. IP masquerading uses iptables to function. Please set --ipmasq to false or --iptables to true.")
|
|
| 734 |
+ config.EnableIpMasq = false |
|
| 735 | 735 |
} |
| 736 | 736 |
config.DisableNetwork = config.BridgeIface == disableNetworkBridge |
| 737 | 737 |
|
| ... | ... |
@@ -82,3 +82,13 @@ func TestDaemonRestartWithVolumesRefs(t *testing.T) {
|
| 82 | 82 |
|
| 83 | 83 |
logDone("daemon - volume refs are restored")
|
| 84 | 84 |
} |
| 85 |
+ |
|
| 86 |
+func TestDaemonStartIptablesFalse(t *testing.T) {
|
|
| 87 |
+ d := NewDaemon(t) |
|
| 88 |
+ if err := d.Start("--iptables=false"); err != nil {
|
|
| 89 |
+ t.Fatalf("we should have been able to start the daemon with passing iptables=false: %v", err)
|
|
| 90 |
+ } |
|
| 91 |
+ d.Stop() |
|
| 92 |
+ |
|
| 93 |
+ logDone("daemon - started daemon with iptables=false")
|
|
| 94 |
+} |