From 0cb795e432f6b318b07a0e4878e041233e7d7f7c Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Mon, 29 Aug 2022 21:09:37 +0200 Subject: podman, slirp4netns.sh: Use --netns option on pasta's command line ...instead of PATH. This seems to be the only change needed in existing pasta integrations after patch: Use explicit --netns option rather than multiplexing with PID Signed-off-by: Stefano Brivio Reviewed-by: David Gibson --- contrib/podman/0001-libpod-Add-pasta-networking-mode.patch | 6 +++--- slirp4netns.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/podman/0001-libpod-Add-pasta-networking-mode.patch b/contrib/podman/0001-libpod-Add-pasta-networking-mode.patch index 884ebf7..bf608f1 100644 --- a/contrib/podman/0001-libpod-Add-pasta-networking-mode.patch +++ b/contrib/podman/0001-libpod-Add-pasta-networking-mode.patch @@ -1,4 +1,4 @@ -From 9f61d4107f7cce5fb4157e18c67fad9c135d7b9f Mon Sep 17 00:00:00 2001 +From 321b58cf7e9eadb6073c286ed6709747770f5964 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Mon, 2 May 2022 16:12:07 +0200 Subject: [PATCH] libpod: Add pasta networking mode @@ -354,7 +354,7 @@ index c10c3c0b2..0f0c1213c 100644 } diff --git a/libpod/networking_pasta.go b/libpod/networking_pasta.go new file mode 100644 -index 000000000..66f81cbfc +index 000000000..f179c803a --- /dev/null +++ b/libpod/networking_pasta.go @@ -0,0 +1,107 @@ @@ -452,7 +452,7 @@ index 000000000..66f81cbfc + cmdArgs = append(cmdArgs, "-U", "none") + } + -+ cmdArgs = append(cmdArgs, netns.Path()) ++ cmdArgs = append(cmdArgs, "--netns", netns.Path()) + + logrus.Debugf("pasta arguments: %s", strings.Join(cmdArgs, " ")) + diff --git a/slirp4netns.sh b/slirp4netns.sh index ff12a52..1d089b7 100755 --- a/slirp4netns.sh +++ b/slirp4netns.sh @@ -121,7 +121,7 @@ opt() { # start() - Start pasta start() { - ${PASTA} ${PASTA_OPTS} ${PORT_ARGS} ${ns_spec} + ${PASTA} ${PASTA_OPTS} ${PORT_ARGS} --netns ${ns_spec} [ ${RFD} -ne 0 ] && echo "1" >&${RFD} || : } -- cgit v1.2.3