Date: Mon, 16 Jan 2023 12:45:15 +0800 From: Zhenlei Huang <zlei@FreeBSD.org> To: Gleb Smirnoff <glebius@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 8bce8d28abe6 - main - jail: Avoid multipurpose return value of function prison_ip_restrict() Message-ID: <58ED512C-BE38-4EB6-A902-2AF3E25D5615@FreeBSD.org> In-Reply-To: <Y8GzjNMleGOLchR6@FreeBSD.org> References: <202301131046.30DAkA0F024400@gitrepo.freebsd.org> <Y8GzjNMleGOLchR6@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Gleb, Sorry for delayed response, I'll check that within days. Best regards, Zhenlei > On Jan 14, 2023, at 3:39 AM, Gleb Smirnoff <glebius@freebsd.org> = wrote: >=20 > Zhenlei, >=20 > a couple concise assignments missed: >=20 > Z> @@ -1876,15 +1871,15 @@ kern_jail_set(struct thread *td, struct uio = *optuio, int flags) > Z> continue; > Z> } > Z> #endif > Z> - if (prison_ip_restrict(tpr, PR_INET, NULL)) { > Z> - redo_ip4 =3D 1; > Z> + if (!prison_ip_restrict(tpr, PR_INET, NULL)) { > Z> + redo_ip4 =3D true; > Z> descend =3D 0; > Z> } > Z> } > Z> } >=20 > redo_ip4 =3D !prison_ip_restrict(tpr, PR_INET, NULL); >=20 > Z> @@ -1896,8 +1891,8 @@ kern_jail_set(struct thread *td, struct uio = *optuio, int flags) > Z> continue; > Z> } > Z> #endif > Z> - if (prison_ip_restrict(tpr, PR_INET6, NULL)) { > Z> - redo_ip6 =3D 1; > Z> + if (!prison_ip_restrict(tpr, PR_INET6, NULL)) { > Z> + redo_ip6 =3D true; > Z> descend =3D 0; > Z> } > Z> } >=20 > redo_ip6 =3D !prison_ip_restrict(tpr, PR_INET6, NULL); >=20 > --=20 > Gleb Smirnoff
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?58ED512C-BE38-4EB6-A902-2AF3E25D5615>