echo 1 > /proc/sys/net/ipv6/conf/$netif/accept_redirects
wait_for_ipv6_dad $netif
else
- if command -v arping2 >/dev/null; then
- if arping2 -q -C 1 -c 2 -I $netif -0 $ip ; then
- warn "Duplicate address detected for $ip for interface $netif."
- return 1
- fi
- else
- if ! arping -f -q -D -c 2 -I $netif $ip ; then
- warn "Duplicate address detected for $ip for interface $netif."
- return 1
+ if [ -z "$srv" ]; then
+ if command -v arping2 >/dev/null; then
+ if arping2 -q -C 1 -c 2 -I $netif -0 $ip ; then
+ warn "Duplicate address detected for $ip for interface $netif."
+ return 1
+ fi
+ else
+ if ! arping -f -q -D -c 2 -I $netif $ip ; then
+ warn "Duplicate address detected for $ip for interface $netif."
+ return 1
+ fi
fi
fi
ip addr flush dev $netif