diff options
author | Paul Holzinger <pholzing@redhat.com> | 2021-08-26 15:06:38 +0200 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2021-09-15 18:05:26 +0200 |
commit | 24bec9a76bcc2d8e93670047ed0ee8c16d9d7620 (patch) | |
tree | 4f8d62e7f104a1a877651acf77eef291ec71c5f6 /libpod/network/cni/network.go | |
parent | aa7bc4e37168e4cdb4469ba8b728d7f5157e46b5 (diff) | |
download | podman-24bec9a76bcc2d8e93670047ed0ee8c16d9d7620.tar.gz podman-24bec9a76bcc2d8e93670047ed0ee8c16d9d7620.tar.bz2 podman-24bec9a76bcc2d8e93670047ed0ee8c16d9d7620.zip |
default network: do not validate the used subnets
The default network should not be validated against used subnets, we have to ensure
that this network can always be created even when a subnet is already used on the host.
This could happen if you run a container on this net, then the cni interface will be
created on the host and "block" this subnet from being used again.
Therefore the next podman command tries to create the default net again and it would
fail because it thinks the network is used on the host.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'libpod/network/cni/network.go')
-rw-r--r-- | libpod/network/cni/network.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/network/cni/network.go b/libpod/network/cni/network.go index 479f9e0eb..4e4ea7ee5 100644 --- a/libpod/network/cni/network.go +++ b/libpod/network/cni/network.go @@ -179,7 +179,7 @@ func (n *cniNetwork) createDefaultNetwork() (*network, error) { {Subnet: n.defaultSubnet}, }, } - return n.networkCreate(net, false) + return n.networkCreate(net, true) } // getNetwork will lookup a network by name or ID. It returns an |