Add DAD to dhclient-script

The manpage for dhclient-script says:

Before actually configuring the address, dhclient-script should
somehow ARP for it and exit with a nonzero status if it receives a
reply.

By using arping in dracut this is very easy, since arping has a
specific option to do just that.
master
Philippe Seewer 2009-09-17 17:16:46 +02:00 committed by Harald Hoyer
parent 98f25e9694
commit 5fb4ac2286
1 changed files with 4 additions and 0 deletions

View File

@ -64,6 +64,10 @@ case $reason in
wait_for_if_up $netif
;;
BOUND)
if ! arping -q -D -c 2 -I $netif $new_ip_address ; then
warn "Duplicate address detected for $new_ip_address while doing dhcp. retrying"
exit 1
fi
setup_interface
set | while read line; do
[ "${line#new_}" = "$line" ] && continue