summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xetc/rc.d/jail4
-rw-r--r--share/man/man5/rc.conf.58
2 files changed, 10 insertions, 2 deletions
diff --git a/etc/rc.d/jail b/etc/rc.d/jail
index 87eab69..851bf3c 100755
--- a/etc/rc.d/jail
+++ b/etc/rc.d/jail
@@ -39,6 +39,7 @@ init_variables()
_procdir="${_rootdir}/proc"
eval _hostname=\"\$jail_${_j}_hostname\"
eval _ip=\"\$jail_${_j}_ip\"
+ eval _netmask=\"\${jail_${_j}_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}}\"
@@ -93,6 +94,7 @@ init_variables()
debug "$_j mount enable: $_mount"
debug "$_j hostname: $_hostname"
debug "$_j ip: $_ip"
+ debug "$_j netmask: $_netmask"
debug "$_j interface: $_interface"
debug "$_j fib: $_fib"
debug "$_j root: $_rootdir"
@@ -297,7 +299,7 @@ jail_start()
continue;
fi
if [ -n "${_interface}" ]; then
- ifconfig ${_interface} alias ${_ip} netmask 255.255.255.255
+ ifconfig ${_interface} alias ${_ip} netmask ${_netmask}
fi
if [ -n "${_fib}" ]; then
_setfib="setfib -F '${_fib}'"
diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5
index 8f22f02..a664b8f 100644
--- a/share/man/man5/rc.conf.5
+++ b/share/man/man5/rc.conf.5
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd September 16, 2008
+.Dd September 24, 2008
.Dt RC.CONF 5
.Os
.Sh NAME
@@ -3450,6 +3450,12 @@ These are flags to pass to
Unset by default.
When set, sets the interface to use when setting IP address alias.
Note that the alias is created at jail startup and removed at jail shutdown.
+.It Va jail_ Ns Ao Ar jname Ac Ns Va _netmask
+.Pq Vt str
+Set to
+.Li 255.255.255.255
+by default.
+This is the IP netmask to use when setting IP address alias.
.It Va jail_ Ns Ao Ar jname Ac Ns Va _fib
.Pq Vt str
Unset by default.
OpenPOWER on IntegriCloud