[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



Author: jvdias

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

Added Files:
	dhcp-3.0.2-dhclient_script_fast+arping.patch 
Log Message:
remove 1 second sleep on PREINIT; support ARPCHECK/ARPSEND mode

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 ] || \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]