From: Philippe Seewer Date: Thu, 17 Sep 2009 15:16:46 +0000 (+0200) Subject: Add DAD to dhclient-script X-Git-Tag: 003~120 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5fb4ac2286167e1ca400b3ad434d4e3bd4586a19;p=thirdparty%2Fdracut.git 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. --- diff --git a/modules.d/40network/dhclient-script b/modules.d/40network/dhclient-script index 54ec2f568..0bbdcfc62 100755 --- a/modules.d/40network/dhclient-script +++ b/modules.d/40network/dhclient-script @@ -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