Don't set prison's pr_ip4s or pr_ip6s to -1.
PR: 196474 MFC after: 3 days
This commit is contained in:
parent
bf27800837
commit
0e5e396ede
@ -800,7 +800,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags)
|
||||
#ifdef INET
|
||||
error = vfs_getopt(opts, "ip4.addr", &op, &ip4s);
|
||||
if (error == ENOENT)
|
||||
ip4s = (pr_flags & PR_IP4_DISABLE) ? 0 : -1;
|
||||
ip4s = 0;
|
||||
else if (error != 0)
|
||||
goto done_free;
|
||||
else if (ip4s & (sizeof(*ip4) - 1)) {
|
||||
@ -858,7 +858,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags)
|
||||
#ifdef INET6
|
||||
error = vfs_getopt(opts, "ip6.addr", &op, &ip6s);
|
||||
if (error == ENOENT)
|
||||
ip6s = (pr_flags & PR_IP6_DISABLE) ? 0 : -1;
|
||||
ip6s = 0;
|
||||
else if (error != 0)
|
||||
goto done_free;
|
||||
else if (ip6s & (sizeof(*ip6) - 1)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user