rpms/dhcp/devel dhcp-3.0.2-dhclient_script_fast+arping.patch, NONE, 1.1

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Jun 17 19:05:05 UTC 2005


Author: jvdias

Update of /cvs/dist/rpms/dhcp/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv17204

Added Files:
	dhcp-3.0.2-dhclient_script_fast+arping.patch 
Log Message:
remove sleep on PREINIT; add ARPPING / ARPSEND handling

dhcp-3.0.2-dhclient_script_fast+arping.patch:
 linux |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

--- NEW FILE dhcp-3.0.2-dhclient_script_fast+arping.patch ---
--- dhcp-3.0.2/client/scripts/linux.dhclient_script_fast+arping	2005-06-17 14:33:29.000000000 -0400
+++ dhcp-3.0.2/client/scripts/linux	2005-06-17 14:41:57.000000000 -0400
@@ -219,7 +219,7 @@
 		( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then
 		/sbin/ip route replace ${new_network_number}/${prefix_bits} dev $interface
 		if [ $added_old_broadcast_route -eq 1 ]; then
-		    route del default;
+		   /sbin/ip route del default;
 		fi;
 	    fi;
 	    if [[  ( ( -z "$GATEWAYDEV" )  || ( "$GATEWAYDEV" = "$interface" ) ) && ( ( -z "$GATEWAY" )  || ( ( -n "$DHCLIENT_IGNORE_GATEWAY" ) && ( "$DHCLIENT_IGNORE_GATEWAY" = [Yy]* ) ) ) ]]; then
@@ -373,14 +373,20 @@
 	fi     
 
   # We need to give the kernel some time to get the interface up.
-	sleep 1
+  #	sleep 1
+  # I don't think this is necessary with modern kernels - no problems found during testing -
+  # JVD, 2005-06-17
 
 	exit_with_hooks 0
     fi;
 fi
 
 if [ x$reason = xARPCHECK ] || [ x$reason = xARPSEND ]; then
-  exit_with_hooks 0
+    if [ -z "$new_ip_address" ] || [ -z "$interface" ] ||  /sbin/arping -q -c 2 -w 3 -D -I ${interface} ${new_ip_address}; then
+	exit_with_hooks 0
+    else
+	exit_with_hooks 1
+    fi;
 fi
   
 if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \




More information about the fedora-cvs-commits mailing list