summaryrefslogtreecommitdiffstats
path: root/sys/compat
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2013-11-28 19:40:33 +0000
committerpeter <peter@FreeBSD.org>2013-11-28 19:40:33 +0000
commitac40be45fb0d183f60266f8f0488fb44176ab4f1 (patch)
tree1819bacbf5d702cf17da5aaa65ae96c44b196784 /sys/compat
parent9932b97e88bba24ef464d8c0b3686146647f305f (diff)
downloadFreeBSD-src-ac40be45fb0d183f60266f8f0488fb44176ab4f1.zip
FreeBSD-src-ac40be45fb0d183f60266f8f0488fb44176ab4f1.tar.gz
jail_v0.ip_number was always in host byte order. This was handled
in one of the many layers of indirection and shims through stable/7 in jail_handle_ips(). When it was cleaned up and unified through kern_jail() for 8.x, the byte order swap was lost. This only matters for ancient binaries that call jail(2) themselves internally.
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/freebsd32/freebsd32_misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
index 9a5dd43..0703fd3 100644
--- a/sys/compat/freebsd32/freebsd32_misc.c
+++ b/sys/compat/freebsd32/freebsd32_misc.c
@@ -1928,7 +1928,7 @@ freebsd32_jail(struct thread *td, struct freebsd32_jail_args *uap)
CP(j32_v0, j, version);
PTRIN_CP(j32_v0, j, path);
PTRIN_CP(j32_v0, j, hostname);
- j.ip4s = j32_v0.ip_number;
+ j.ip4s = htonl(j32_v0.ip_number); /* jail_v0 is host order */
break;
}
OpenPOWER on IntegriCloud