File 0007-Use-link_ready_wait-instead-of-up-flag-check-loop.patch of Package sysconfig.openSUSE_12.1_Update

From de8b5666d145d0846f7e031f5ce2e7cc70417763 Mon Sep 17 00:00:00 2001
From: Marius Tomaschewski <mt@suse.com>
Date: Thu, 5 Jan 2012 17:56:33 +0100
Subject: [PATCH] Use link_ready_wait instead of up flag check loop

A loop checking the link UP flag was immediately successful
and thus useless. Use a short 3 sec link_ready_wait instead
to give the kernel some time to apply scope local address
and start async tasks like IPv6 dad and avoid some of the
initial send errors reported by dhclient6 (bnc#697929).

Signed-off-by: Marius Tomaschewski <mt@suse.com>
---
 scripts/ifup-dhcp |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/ifup-dhcp b/scripts/ifup-dhcp
index 8315f92..e42e615 100755
--- a/scripts/ifup-dhcp
+++ b/scripts/ifup-dhcp
@@ -677,12 +677,12 @@ case "$ACTION" in
 
 			debug "Activating interface $INTERFACE"
 			if ! is_iface_up $INTERFACE ; then
+
 				ip link set $INTERFACE up ${MTU:+mtu $MTU} \
 				   ${LLADDR:+address $LLADDR} $LINK_OPTIONS
-				for ((count=200; count >= 0; count--)) ; do
-					is_iface_up $INTERFACE && break
-					usleep 25000
-				done
+
+				# wait a bit or dhclient(6) may produce false send errors
+				link_ready_wait "$INTERFACE" 3
 
 				# (optionally) wait until a device is really configured
 				sleep ${DHCLIENT_SLEEP:-0}
-- 
1.7.7

openSUSE Build Service is sponsored by