--- network/connections/ethernet.orig 2012-05-15 19:38:22.928145558 +0200 +++ network/connections/ethernet 2012-05-15 19:51:25.990570008 +0200 @@ -16,6 +16,7 @@ ethernet_up() { load_profile "$1" SYSCTL_INTERFACE="${INTERFACE/.//}" + local timeout="${DAD_TIMEOUT:-3}" if [[ ! -e "/sys/class/net/$INTERFACE" ]]; then if ! echo "$INTERFACE" | fgrep -q ":"; then @@ -187,11 +188,17 @@ fi fi + # Wait for duplicate address detection to finish + while [[ -n "$(ip -6 addr show dev $INTERFACE tentative)" && $timeout -gt 0 ]]; do + sleep 1 + let timeout-- + done + # Add static IPv6 routes if [[ -n "$ROUTES6" ]]; then for route in "${ROUTES6[@]}"; do report_debug ethernet_iproute_up ip -6 route add "$route" dev "$INTERFACE" - if ! ip -6 route add "$route" dev "$INTERFACE"; then + if ! ip -6 route add $route dev "$INTERFACE"; then report_iproute "Adding route '$route' failed" fi done