mirror of
https://github.com/containers/podman.git
synced 2025-10-27 03:06:22 +08:00
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>
This package abstracts CNI from libpod.
It implements the ContainerNetwork interface defined in libpod/network/types/network.go for the CNI backend.
Testing
Run the tests with:
go test -v -mod=vendor -cover ./libpod/network/cni/
Run the tests as root to also test setup/teardown. This will execute CNI and therefore the cni plugins have to be installed.