From 4f22608e542ee5fb20d191a5da67891063358076 Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Thu, 17 Jan 2013 01:27:39 +0000 Subject: [PATCH] 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 --- etc/rc.d/jail | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/etc/rc.d/jail b/etc/rc.d/jail index ff2f312caa6..f19983fab92 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 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() -- 2.45.0