summaryrefslogtreecommitdiff
path: root/libpod/runtime.go
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2021-11-11 16:37:13 +0100
committerPaul Holzinger <pholzing@redhat.com>2021-11-11 17:30:27 +0100
commitfe90a45e0d914723b8c26e4e9497f414312b6af0 (patch)
tree883c28f2c52c6a2c6e01848efd7ca763216ddf2c /libpod/runtime.go
parent8041d44c93ac46d330325cda849716f5ba2c40d9 (diff)
downloadpodman-fe90a45e0d914723b8c26e4e9497f414312b6af0.tar.gz
podman-fe90a45e0d914723b8c26e4e9497f414312b6af0.tar.bz2
podman-fe90a45e0d914723b8c26e4e9497f414312b6af0.zip
Add flag to overwrite network backend from config
To make testing easier we can overwrite the network backend with the global `--network-backend` option. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'libpod/runtime.go')
-rw-r--r--libpod/runtime.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go
index 71bfaff9a..c751df79b 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -499,6 +499,10 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (retErr error) {
if err != nil {
return errors.Wrapf(err, "could not create network interface")
}
+ if runtime.config.Network.NetworkBackend == "" {
+ // set backend to cni so that podman info can display it
+ runtime.config.Network.NetworkBackend = "cni"
+ }
case "netavark":
netavarkBin, err := runtime.config.FindHelperBinary("netavark", false)