From 216e2cb36679abfcca869bed110b73e816ff9bf4 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Mon, 8 Nov 2021 20:35:22 +0100 Subject: Fix rootless networking with userns and ports A rootless container created with a custom userns and forwarded ports did not work. I refactored the network setup to make the setup logic more clear. Signed-off-by: Paul Holzinger --- test/system/500-networking.bats | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/system') diff --git a/test/system/500-networking.bats b/test/system/500-networking.bats index b3471b425..815c77609 100644 --- a/test/system/500-networking.bats +++ b/test/system/500-networking.bats @@ -78,6 +78,9 @@ load helpers if [[ -z $cidr ]]; then # regex to match that we are in 10.X subnet match="10\..*" + # force bridge networking also for rootless + # this ensures that rootless + bridge + userns + ports works + network_arg="--network bridge" else # Issue #9828 make sure a custom slir4netns cidr also works network_arg="--network slirp4netns:cidr=$cidr" -- cgit v1.2.3-54-g00ecf