Add a new rootlessnetns package based on the rootless netns code from
podman. It however makes some significant changes:
- First it uses a directory in the runroot and not tmpdir.
- The netns mount is stored in the directoy and not the global netns
runtime dir to prevent name collisions. The old code used the sha256
to do that.
- The teardown and setup logic has been made more robust and now used a
reference counter to keep track on when to cleanup. The podman
cleanup logic was racy and tied to running podman containers. Given
the plan to allow buildah to use this as well we need this.
- There is no lock for this code, the goal is to have this called
through the network interface which is already locked so there is no
need for another lock here.
Future work:
- add pasta support
- add port forwarding logic here
Signed-off-by: Paul Holzinger <pholzing@redhat.com>