HomeFreeBSD

jail: Avoid multipurpose return value of function prison_ip_restrict()

Description

jail: Avoid multipurpose return value of function prison_ip_restrict()

Currently function prison_ip_restrict() returns true if the replacement
buffer was used, or no buffer provided and allocation fails and should
redo. The logic is confusing and cause possibly infinite loop from
eb8dcdeac22d .

Reviewed by: jamie, glebius
Approved by: kp (mentor)
Differential Revision: https://reviews.freebsd.org/D37918

Details

Provenance
zleiAuthored on Dec 31 2022, 2:56 AM
Reviewer
jamie
Differential Revision
D37918: jail: Avoid multipurpose return value of function prison_ip_restrict()
Parents
rG89ddfbbac84c: jail: Fix regression panic from eb8dcdeac22d
Branches
Unknown
Tags
Unknown