Re: git: 8bce8d28abe6 - main - jail: Avoid multipurpose return value of function prison_ip_restrict()
- Reply: Zhenlei Huang : "Re: git: 8bce8d28abe6 - main - jail: Avoid multipurpose return value of function prison_ip_restrict()"
- Reply: Zhenlei Huang : "Re: git: 8bce8d28abe6 - main - jail: Avoid multipurpose return value of function prison_ip_restrict()"
- In reply to: Zhenlei Huang : "git: 8bce8d28abe6 - main - jail: Avoid multipurpose return value of function prison_ip_restrict()"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 13 Jan 2023 19:39:56 UTC
Zhenlei, a couple concise assignments missed: 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 = 1; Z> + if (!prison_ip_restrict(tpr, PR_INET, NULL)) { Z> + redo_ip4 = true; Z> descend = 0; Z> } Z> } Z> } redo_ip4 = !prison_ip_restrict(tpr, PR_INET, NULL); 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 = 1; Z> + if (!prison_ip_restrict(tpr, PR_INET6, NULL)) { Z> + redo_ip6 = true; Z> descend = 0; Z> } Z> } redo_ip6 = !prison_ip_restrict(tpr, PR_INET6, NULL); -- Gleb Smirnoff