mirror of
https://github.com/containers/podman.git
synced 2025-05-21 00:56:36 +08:00

This moves platform-specific details of the network implementation out of the generic file so that we can add the FreeBSD equivalent. [NO NEW TESTS NEEDED] Signed-off-by: Doug Rabson <dfr@rabson.org>
23 lines
525 B
Go
23 lines
525 B
Go
//go:build freebsd
|
|
// +build freebsd
|
|
|
|
package libpod
|
|
|
|
type containerPlatformState struct {
|
|
// NetworkJail is the name of the container's network VNET
|
|
// jail. Will only be set if config.CreateNetNS is true, or
|
|
// the container was told to join another container's network
|
|
// namespace.
|
|
NetworkJail string `json:"-"`
|
|
}
|
|
|
|
func networkDisabled(c *Container) (bool, error) {
|
|
if c.config.CreateNetNS {
|
|
return false, nil
|
|
}
|
|
if !c.config.PostConfigureNetNS {
|
|
return c.state.NetworkJail == "", nil
|
|
}
|
|
return false, nil
|
|
}
|