svn commit: r258784 - in stable/9/sys: compat/freebsd32 kern

Peter Wemm peter at FreeBSD.org
Sat Nov 30 23:08:32 UTC 2013


Author: peter
Date: Sat Nov 30 23:08:32 2013
New Revision: 258784
URL: http://svnweb.freebsd.org/changeset/base/258784

Log:
  MFC: r258718: fix emulated jail_v0 byte order

Modified:
  stable/9/sys/compat/freebsd32/freebsd32_misc.c
  stable/9/sys/kern/kern_jail.c

Modified: stable/9/sys/compat/freebsd32/freebsd32_misc.c
==============================================================================
--- stable/9/sys/compat/freebsd32/freebsd32_misc.c	Sat Nov 30 23:06:51 2013	(r258783)
+++ stable/9/sys/compat/freebsd32/freebsd32_misc.c	Sat Nov 30 23:08:32 2013	(r258784)
@@ -1913,7 +1913,7 @@ freebsd32_jail(struct thread *td, struct
 		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;
 	}
 

Modified: stable/9/sys/kern/kern_jail.c
==============================================================================
--- stable/9/sys/kern/kern_jail.c	Sat Nov 30 23:06:51 2013	(r258783)
+++ stable/9/sys/kern/kern_jail.c	Sat Nov 30 23:08:32 2013	(r258784)
@@ -311,7 +311,7 @@ sys_jail(struct thread *td, struct jail_
 		j.version = j0.version;
 		j.path = j0.path;
 		j.hostname = j0.hostname;
-		j.ip4s = j0.ip_number;
+		j.ip4s = htonl(j0.ip_number);	/* jail_v0 is host order */
 		break;
 	}
 


More information about the svn-src-stable-9 mailing list