Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Nov 2012 02:30:01 GMT
From:      "Dewayne" <dewayne.geraghty@heuristicsystems.com.au>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/169028: /usr/sbin/jail fails with &quot; jail: unknown parameter: ip6&quot; 
Message-ID:  <201211230230.qAN2U1rF030656@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/169028; it has been noted by GNATS.

From: "Dewayne" <dewayne.geraghty@heuristicsystems.com.au>
To: <bug-followup@freebsd.org>, <bartsch@dssgmbh.de>
Cc: <obrien@freebsd.org>
Subject: Re: bin/169028: /usr/sbin/jail fails with &quot;jail: unknown parameter: ip6&quot;
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 \
                         </dev/null
 
                 if [ "$?" -eq 0 ] ; then
 
 
 Regards, Dewayne.
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211230230.qAN2U1rF030656>