https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196474

Jamie Gritton <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|[email protected]    |[email protected]
             Status|New                         |In Progress

--- Comment #10 from Jamie Gritton <[email protected]> ---
Created attachment 151509
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=151509&action=edit
Don't set pr_ip4s to -1

I'm with Bjoern in that I see the problem on the jail_set end, and not the
jail_get end.  But I wouldn't want to make the command fail.  It seems a
reasonable analog to (the correct) "ip4=disable", and in fact ends up treating
it the same way in every respect except the jail_get panic.

It's never proper for pr_ip4 to have a negative value.  It used to be, before
the PR_IP4_DISABLE flag, and I would test for it in the proper places.  But I
was incorrect to keep that vestige when I added the flag.  I must have
considered it proper at the time since I took pains to keep it, but a
years-later code review concludes differently.

My patch merely gets rid of the -1 that doesn't belong.

After that, the only difference between an ip4-disabled jail and one that is
set to no addresses is the PR_IP4_DISABLED flag.  Both have no addresses, and
will not admit to supporting IPV4.  In fact, PR_IP4_DISABLED, which is only
ever referenced in kern_jail.c, becomes write-only and useless.  I plan to
issue a second patch which removes it entirely.  But that isn't quite part of
this bug.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to