Date: Mon, 30 May 2011 09:41:38 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r222487 - head/tools/regression/netinet/udpconnectjail Message-ID: <201105300941.p4U9fdbL069986@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bz Date: Mon May 30 09:41:38 2011 New Revision: 222487 URL: http://svn.freebsd.org/changeset/base/222487 Log: Upgrade jail(2) to latest jail(2) API to make the regression test work again. Eventually should switch to jail_set(2). Reported by: rwatson MFC after: 10 days Modified: head/tools/regression/netinet/udpconnectjail/udpconnectjail.c Modified: head/tools/regression/netinet/udpconnectjail/udpconnectjail.c ============================================================================== --- head/tools/regression/netinet/udpconnectjail/udpconnectjail.c Mon May 30 09:34:15 2011 (r222486) +++ head/tools/regression/netinet/udpconnectjail/udpconnectjail.c Mon May 30 09:41:38 2011 (r222487) @@ -77,6 +77,7 @@ main(int argc, __unused char *argv[]) { struct sockaddr_in sin; struct jail thejail; + struct in_addr ia4; if (argc != 1) usage(); @@ -94,12 +95,18 @@ main(int argc, __unused char *argv[]) /* * Now re-run in a jail. + * XXX-BZ should switch to jail_set(2). */ + ia4.s_addr = htonl(INADDR_LOOPBACK); + bzero(&thejail, sizeof(thejail)); - thejail.version = 0; + thejail.version = JAIL_API_VERSION; thejail.path = "/"; thejail.hostname = "jail"; - thejail.ip_number = INADDR_LOOPBACK; + thejail.jailname = "udpconnectjail"; + thejail.ip4s = 1; + thejail.ip4 = &ia4; + if (jail(&thejail) < 0) errx(-1, "jail: %s", strerror(errno)); test("in jail", &sin);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105300941.p4U9fdbL069986>