diff options
author | Doug Rabson <dfr@rabson.org> | 2022-08-26 15:26:57 +0100 |
---|---|---|
committer | Doug Rabson <dfr@rabson.org> | 2022-09-05 10:12:12 +0100 |
commit | 8ade76e79b78bffd6eb055db35de0b3ad4475804 (patch) | |
tree | 6cd23a5638dbaa34795316a71e0db7e686e53810 /libpod/container_freebsd.go | |
parent | 098c0714e5c2c461c175753eef3dc9d900699be5 (diff) | |
download | podman-8ade76e79b78bffd6eb055db35de0b3ad4475804.tar.gz podman-8ade76e79b78bffd6eb055db35de0b3ad4475804.tar.bz2 podman-8ade76e79b78bffd6eb055db35de0b3ad4475804.zip |
libpod: Move networkDisable to container_linux.go
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>
Diffstat (limited to 'libpod/container_freebsd.go')
-rw-r--r-- | libpod/container_freebsd.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libpod/container_freebsd.go b/libpod/container_freebsd.go index f9fbc4daa..7292ba37a 100644 --- a/libpod/container_freebsd.go +++ b/libpod/container_freebsd.go @@ -10,3 +10,13 @@ type containerPlatformState struct { // 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 +} |