From fd88ee22f383b42084acbb2a44c356e2d277e912 Mon Sep 17 00:00:00 2001 From: Martin Schanzenbach Date: Mon, 7 Mar 2022 09:34:29 +0100 Subject: -use nft instead of iptables for netjail --- src/transport/test_transport_simple_send.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/transport/test_transport_simple_send.sh b/src/transport/test_transport_simple_send.sh index 3d5266622..0250070be 100755 --- a/src/transport/test_transport_simple_send.sh +++ b/src/transport/test_transport_simple_send.sh @@ -2,9 +2,10 @@ if ! [ -d "/run/netns" ]; then echo You have to create the directory /run/netns. fi -if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" == 1 ]; then - exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; ./test_transport_start_with_config test_transport_simple_send_topo.conf" -else +if [ -f /proc/sys/kernel/unprivileged_userns_clone ]; then + if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" != 1 ]; then echo -e "Error during test setup: The kernel parameter kernel.unprivileged_userns_clone has to be set to 1! One has to execute\n\n sysctl kernel.unprivileged_userns_clone=1\n" exit 78 + fi fi +exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; ./test_transport_start_with_config test_transport_simple_send_topo.conf" -- cgit v1.2.3