From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson To: passt-dev@passt.top Subject: Re: [PATCH v2 08/10] Correctly handle --netns-only in pasta_start_ns() Date: Sat, 10 Sep 2022 17:25:36 +1000 Message-ID: In-Reply-To: <20220909163420.32970c5b@elisabeth> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1828207234481512379==" --===============1828207234481512379== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Fri, Sep 09, 2022 at 04:34:20PM +0200, Stefano Brivio wrote: > On Thu, 8 Sep 2022 13:59:05 +1000 > David Gibson wrote: >=20 > > --netns-only is supposed to make pasta use only a network namespace, not > > a user namespace. However, pasta_start_ns() has this backwards, and if > > --netns-only is specified it creates a user namespace but *not* a network > > namespace. Correct this. > >=20 > > Signed-off-by: David Gibson > > --- > > pasta.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > >=20 > > diff --git a/pasta.c b/pasta.c > > index 0fd45e4..7eac8e9 100644 > > --- a/pasta.c > > +++ b/pasta.c > > @@ -244,8 +244,8 @@ void pasta_start_ns(struct ctx *c, int argc, char *ar= gv[]) > > =20 > > pasta_child_pid =3D clone(pasta_setup_ns, > > ns_fn_stack + sizeof(ns_fn_stack) / 2, > > - (c->netns_only ? 0 : CLONE_NEWNET) | > > - CLONE_NEWIPC | CLONE_NEWPID | CLONE_NEWUSER | > > + (c->netns_only ? 0 : CLONE_NEWUSER) | > > + CLONE_NEWIPC | CLONE_NEWPID | CLONE_NEWNET | >=20 > Oh, funny, so it never worked in this case. >=20 > I thought anyway your plan was to drop --netns-only altogether, and if > a --netns option is specified without --userns, then it's implied. Is > that still on the table (outside the scope of this series I presume)? Well.. having reduced the lifetome of netns_only to within conf() alone, I felt a lot less urgency about removing it entirely. It might still be nicer to remove it anyway; I'll have another look. --=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 --===============1828207234481512379== Content-Type: application/pgp-signature Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="signature.asc" MIME-Version: 1.0 LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KCmlRSXpCQUVCQ0FBZEZpRUVvVUx4V3U0L1dz MGRCK1h0Z3lwWTRnRXdZU0lGQW1NY08ra0FDZ2tRZ3lwWTRnRXcKWVNLVHZ4QUF4K2tBSGgzZlM5 MERneWZIMWN2bkJvRUVrMkJMRjdpODJvanJSeDZlR0dJNHhDZXhtMXpQT3EvNApxZ2Q4V2FzWkJC b0E5UU0rNHN6SDdCdXI4bVR4SEVSU0IxUC9kMnFKSFg4VEsvdnc2QStFT0pKRncwbGVkU1lyCmJj UG1tNVpHZ2t1aXloVG9jMTE2UStvdVprUkhQeXFzY0UxMTJHcmh2dmtpK2pWZWhTRTBERXBHcjY5 L2UxU2QKOFEwMGZXS3NCRjR3VnJsUmhaNTBjMllEUU5DdnZXS3Nnblk1QzJKdGliUWxRMG0wem8x ckV6dHVDWmI4OVI4agpsaFNDRnVPVk5LbWlNODF1SlhnbEs2YjBFN3NJb3VDV1pJR2J4MlYrdXgz VU83RTJUd2swNzlQbVZyU3V1ZlY0CmNlUWpkRENFZGdPNWJhRHRzT1NrRUdRbzA4aFhCZ3FUMHlV c1h3TkpyMmpYcVVwOHAycFVYSm84WFNQb3F2M3EKczlIeS91OEt0WHd3WDE3MGpEdVpCdENiSjdV YkRsUmkwbnQ0NXVYR3FoR3RMVXlKTDhkd3gwTjRnRVRxZ1piNwpIaUIzYkkvbWppM2gyMEE3SlJn d0kra25oYUFzTzFkcUw5aFUwb3FGYXhWOEx4RzgxaExzSXc5Zlo1T1lXOVljCkRCRVFvWnpmNzJ6 d0IxZ2h4WGVmTldSSjBacy9Ndzh2M05uaFVHckpwVzFnb25WaVl6dkpNT0FrOWxsMXQwRkwKVzlh SzZvUHByNlBWNnpDaEcvZVpCZkl0TzR6aHhqeDYrTDEvZnM0VU5vV3luL01TNmV2MnhOdk1Xd3A4 aUdTLwpMQk03eUlTTmtqOVR2cXIxYXladWRPYlNKdENRS2RJR3FCTi9yanZlRWI2S1RFZXlqeFU9 Cj0vV24wCi0tLS0tRU5EIFBHUCBTSUdOQVRVUkUtLS0tLQo= --===============1828207234481512379==--