summaryrefslogtreecommitdiff
path: root/libpod/define
diff options
context:
space:
mode:
authorPaul Holzinger <paul.holzinger@web.de>2021-05-16 17:42:23 +0200
committerPaul Holzinger <paul.holzinger@web.de>2021-05-17 10:55:02 +0200
commit4462113c5e1d51b2ac6516afb96a9ae83c00254e (patch)
tree10727f7d0d237fa4303bc5f0d411a45e5565e882 /libpod/define
parenta6a3df0273d19197286d12a805d7bc34c787b25f (diff)
downloadpodman-4462113c5e1d51b2ac6516afb96a9ae83c00254e.tar.gz
podman-4462113c5e1d51b2ac6516afb96a9ae83c00254e.tar.bz2
podman-4462113c5e1d51b2ac6516afb96a9ae83c00254e.zip
podman network reload add rootless support
Allow podman network reload to be run as rootless user. While it is unlikely that the iptable rules are flushed inside the rootless cni namespace, it could still happen. Also fix podman network reload --all to ignore errors when a container does not have the bridge network mode, e.g. slirp4netns. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'libpod/define')
-rw-r--r--libpod/define/errors.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/libpod/define/errors.go b/libpod/define/errors.go
index 64c652eec..81bf5f69c 100644
--- a/libpod/define/errors.go
+++ b/libpod/define/errors.go
@@ -179,6 +179,9 @@ var (
// ErrNoNetwork indicates that a container has no net namespace, like network=none
ErrNoNetwork = errors.New("container has no network namespace")
+ // ErrNetworkModeInvalid indicates that a container has the wrong network mode for an operation
+ ErrNetworkModeInvalid = errors.New("invalid network mode")
+
// ErrSetSecurityAttribute indicates that a request to set a container's security attribute
// was not possible.
ErrSetSecurityAttribute = fmt.Errorf("%w: unable to assign security attribute", ErrOCIRuntime)