summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2013-01-17 01:27:39 +0000
committerbz <bz@FreeBSD.org>2013-01-17 01:27:39 +0000
commitc68369b5438c9258d7f356fa9ab19aa5e3bda079 (patch)
tree22cac53484851c8ec90fbdfc6eb35ac1ce19f447 /etc
parentd3c13df6d1c6d7707a4bcfaf5b1711c4d0621064 (diff)
downloadFreeBSD-src-c68369b5438c9258d7f356fa9ab19aa5e3bda079.zip
FreeBSD-src-c68369b5438c9258d7f356fa9ab19aa5e3bda079.tar.gz
Add a conditional sleep 1 in case we add any IPv6 addresses to interfaces.
Do this per jail started, not per address. This will allow DAD to complete and services to properly start. Before we have seen problems with services trying to start before the IPv6 address was available to use and thus erroring and failing to start. MFC after: 3 days
Diffstat (limited to 'etc')
-rwxr-xr-xetc/rc.d/jail9
1 files changed, 8 insertions, 1 deletions
diff --git a/etc/rc.d/jail b/etc/rc.d/jail
index ff2f312..f19983f 100755
--- a/etc/rc.d/jail
+++ b/etc/rc.d/jail
@@ -509,7 +509,7 @@ jail_handle_ips_option()
esac
case "${_type}" in
inet) ;;
- inet6) ;;
+ inet6) ipv6_address_count=$((ipv6_address_count + 1)) ;;
*) warn "Could not determine address family. Not going" \
"to ${_action} address '${_addr}' for ${_jail}."
continue
@@ -546,6 +546,7 @@ jail_ips()
esac
# Handle addresses.
+ ipv6_address_count=0
jail_handle_ips_option ${_action} "${_ip}"
# Handle jail_xxx_ip_multi<N>
alias=0
@@ -558,6 +559,12 @@ jail_ips()
;;
esac
done
+ case ${ipv6_address_count} in
+ 0) ;;
+ *) # Sleep 1 second to let DAD complete before starting services.
+ sleep 1
+ ;;
+ esac
}
jail_prestart()
OpenPOWER on IntegriCloud