# IPv6 in use ?
if is_yes "$IPV6_NETWORKING" && [ -n "${IP6ADDR}" ]; then
ip addr add ${IP6ADDR} dev ${DEVICE} ${IP6ADDROPT}
+ timeout=0
+ while [ $timeout -le 20 ] && \
+ if_state="`ip -o addr list dev ${DEVICE} to ${IP6ADDR}`" && \
+ echo "$if_state" | grep -q tentative && \
+ ! echo "$if_state" | grep -q dadfailed ; do
+ usleep 500000
+ timeout=$((timeout+1))
+ done
+ if ip -o addr list dev ${DEVICE} to ${IP6ADDR} | grep -q dadfailed ; then
+ ip addr del ${IP6ADDR} dev ${DEVICE}
+ nls '%s: Duplicated address detected: %s' "$DEVICE" "$IP6ADDR"
+ exit 1
+ fi
if [ -n "${IP6ADDRLABEL}" ]; then
ip addrlabel add prefix ${IP6ADDR} dev ${DEVICE} label ${IP6ADDRLABEL}
fi