additional EnableIPTables check in isolateNetwork

Signed-off-by: Benjamin Böhmke <benjamin@boehmke.net>
This commit is contained in:
Benjamin Böhmke 2020-07-22 15:06:19 +02:00
parent a4fcced708
commit 1e1408f421

View file

@ -340,7 +340,10 @@ func (n *bridgeNetwork) isolateNetwork(others []*bridgeNetwork, enable bool) err
}
}
return setINC(iptables.IPv4, thisConfig.BridgeName, enable)
if n.driver.config.EnableIPTables {
return setINC(iptables.IPv4, thisConfig.BridgeName, enable)
}
return nil
}
func (d *driver) configure(option map[string]interface{}) error {