Index: etc/defaults/rc.conf =================================================================== RCS file: /usr/home/ncvs/src/etc/defaults/rc.conf,v retrieving revision 1.288 diff -u -r1.288 rc.conf --- etc/defaults/rc.conf 7 Jun 2006 17:14:27 -0000 1.288 +++ etc/defaults/rc.conf 4 Jul 2006 22:01:04 -0000 @@ -547,6 +547,7 @@ #jail_example_rootdir="/usr/jail/default" # Jail's root directory #jail_example_hostname="default.domain.com" # Jail's hostname #jail_example_ip="192.168.0.10" # Jail's IP number +#jail_example_netmask="255.255.255.255" # Jail's IP netmask #jail_example_interface="" # Interface to create the IP alias on #jail_example_exec_start="/bin/sh /etc/rc" # command to execute in jail for starting #jail_example_exec_afterstart0="/bin/sh command" # command to execute after the one for Index: etc/rc.d/jail =================================================================== RCS file: /usr/home/ncvs/src/etc/rc.d/jail,v retrieving revision 1.34 diff -u -r1.34 jail --- etc/rc.d/jail 30 May 2006 16:20:48 -0000 1.34 +++ etc/rc.d/jail 4 Jul 2006 22:01:05 -0000 @@ -33,6 +33,8 @@ _procdir="${_rootdir}/proc" eval _hostname=\"\$jail_${_j}_hostname\" eval _ip=\"\$jail_${_j}_ip\" + eval _netmask=\"\$jail_${_j}_netmask\" + [ -z "${_netmask}" ] && _netmask="255.255.255.255" eval _interface=\"\${jail_${_j}_interface:-${jail_interface}}\" eval _exec=\"\$jail_${_j}_exec\" eval _exec_start=\"\${jail_${_j}_exec_start:-${jail_exec_start}}\" @@ -84,6 +86,7 @@ debug "$_j mount enable: $_mount" debug "$_j hostname: $_hostname" debug "$_j ip: $_ip" + debug "$_j netmask: $_netmask" debug "$_j interface: $_interface" debug "$_j root: $_rootdir" debug "$_j devdir: $_devdir" @@ -117,6 +120,9 @@ if [ -z "${_ip}" ]; then err 3 "$name: No IP address has been defined for ${_j}" fi + if [ -z "${_netmask}" ]; then + err 3 "$name: No netmask has been defined for ${_j}" + fi } @@ -197,7 +203,7 @@ continue; fi if [ -n "${_interface}" ]; then - ifconfig ${_interface} alias ${_ip} netmask 255.255.255.255 + ifconfig ${_interface} alias ${_ip} netmask ${_netmask} fi if checkyesno _mount; then info "Mounting fstab for jail ${_jail} (${_fstab})" Index: share/man/man5/rc.conf.5 =================================================================== RCS file: /usr/home/ncvs/src/share/man/man5/rc.conf.5,v retrieving revision 1.299 diff -u -r1.299 rc.conf.5 --- share/man/man5/rc.conf.5 1 Jun 2006 11:01:54 -0000 1.299 +++ share/man/man5/rc.conf.5 4 Jul 2006 22:01:05 -0000 @@ -3113,6 +3113,13 @@ Unset by default. Set to the IP address assigned to jail .Va jname . +.It Va jail_ Ns Ao Ar jname Ac Ns Va _netmask +.Pq Vt str +Set to the netmask assigned to jail +.Va jname . +Set to +.Dq Li 255.255.255.255 +by default. .It Va jail_ Ns Ao Ar jname Ac Ns Va _flags .Pq Vt str Set to