From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson To: passt-dev@passt.top Subject: Re: [PATCH] podman, slirp4netns.sh: Use --netns option on pasta's command line Date: Tue, 30 Aug 2022 11:22:55 +1000 Message-ID: In-Reply-To: <20220829191643.3656079-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8642479461305250559==" --===============8642479461305250559== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Mon, Aug 29, 2022 at 09:16:43PM +0200, Stefano Brivio wrote: > ...instead of PATH. This seems to be the only change needed in > existing pasta integrations after patch: >=20 > Use explicit --netns option rather than multiplexing with PID >=20 > 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(-) >=20 > diff --git a/contrib/podman/0001-libpod-Add-pasta-networking-mode.patch b/c= ontrib/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 =3D append(cmdArgs, "-U", "none") > + } > + > -+ cmdArgs =3D append(cmdArgs, netns.Path()) > ++ cmdArgs =3D 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() { > =20 > # 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} || : > } > =20 --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --===============8642479461305250559== Content-Type: application/pgp-signature Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="signature.asc" MIME-Version: 1.0 LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KCmlRSXpCQUVCQ0FBZEZpRUVvVUx4V3U0L1dz MGRCK1h0Z3lwWTRnRXdZU0lGQW1NTlpta0FDZ2tRZ3lwWTRnRXcKWVNMdTBRLy9mQnQ1QUZBQUFT MGxFZGxPeWFQRXgvR01jUk44V0Nrd2pyYlJTaVRBWS9tVEJhVUR6K3laMWJXWApoL1FHTXZieVlD L1gwNUFJOG5wMTF1K2xXa2FldG55bUZTSUFqcXpVdEFtVTJpb3dxdVRSWXNXRW5ISmQxUVplCjgz dGpxRE1wQ3RvanBCV3ZzTnRlZ2l1cWxsVDlzZ2hMckg5aWpQZHcxcitDSlJQYWtmcFFjV1dCUjRX bklKRDIKdkJpQ1dFd29zYVRKRzhwVXVXbjEyeVVvWXhkeGRlTGYxM0xyeVNlYVVQcEcyN1V0ZUtG WVd1eFNncURFL2lvRApOY2V1czY4Z21CTFU0bG91ZkZuTUFXZDB0cVVRVldiSlVNWU9EU0d0Sytv b21PeU1MeTRVc1NHM1l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