From owner-freebsd-bugs@FreeBSD.ORG Fri Nov 23 02:30:01 2012 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9F99B798 for ; Fri, 23 Nov 2012 02:30:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 6A5818FC14 for ; Fri, 23 Nov 2012 02:30:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id qAN2U1dK030657 for ; Fri, 23 Nov 2012 02:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qAN2U1rF030656; Fri, 23 Nov 2012 02:30:01 GMT (envelope-from gnats) Date: Fri, 23 Nov 2012 02:30:01 GMT Message-Id: <201211230230.qAN2U1rF030656@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "Dewayne" Subject: Re: bin/169028: /usr/sbin/jail fails with " jail: unknown parameter: ip6" X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Dewayne List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Nov 2012 02:30:01 -0000 The following reply was made to PR bin/169028; it has been noted by GNATS. From: "Dewayne" To: , Cc: Subject: Re: bin/169028: /usr/sbin/jail fails with "jail: unknown parameter: ip6" Date: Fri, 23 Nov 2012 13:26:01 +1100 This problem only affects people using jails built without IPV6. The patch below fixes the problem, and anticipates builds without IPv4 :) My apologies, in advance for the line breaks that my mailer will insert. The following patch is applied against 9-Stable built on 17th Nov 2012. For $FreeBSD: src/etc/rc.d/jail,v 1.47.2.6 2012/10/26 18:06:49 obrien Exp $ --- jail.orig 2012-11-06 13:37:55.000000000 +1100 +++ jail 2012-11-23 12:32:42.000000000 +1100 @@ -655,8 +655,20 @@ i=$((i + 1)) done + if [ ! -z ${_addrl} ]; then + eval IPV4="ip4.addr=\"${_addrl}\"" + else + IPV4="" + fi + + if [ ! -z ${_addr6l} ]; then + eval IPV6="ip6.addr=\"${_addr6l}\"" + else + IPV6="" + fi + eval ${_setfib} jail -n ${_jail} ${_flags} -i -c path=${_rootdir} host.hostname=${_hostname} \ - ip4.addr=\"${_addrl}\" ip6.addr=\"${_addr6l}\" ${_parameters} command=${_exec_start} > ${_tmp_jail} 2>&1 \ + "$IPV4" "$IPV6" ${_parameters} command=${_exec_start} > ${_tmp_jail} 2>&1 \