[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [BusyBox] [PATCH] udhcpc handle leasefail
From:       Steven Scholz <steven.scholz () imc-berlin ! de>
Date:       2003-08-29 7:21:11
[Download RAW message or body]

Hi there,

Just as a reminder:

The applied simple patch allows one to detect and handle the case where no lease 
could be obtained via DHCP. (Just add a section "failed" to your script.)

This might come handy when one wants to implement some kind of APIPA behaviour as 
use by M$ and as described earlier.

Thanks,

Steven


["leasefail.patch" (text/plain)]

Index: networking/udhcp/dhcpc.c
===================================================================
RCS file: /var/cvs/busybox/networking/udhcp/dhcpc.c,v
retrieving revision 1.11
diff -u -r1.11 dhcpc.c
--- networking/udhcp/dhcpc.c	20 Jun 2003 09:20:28 -0000	1.11
+++ networking/udhcp/dhcpc.c	29 Aug 2003 07:22:47 -0000
@@ -297,6 +297,7 @@
 					timeout = now + ((packet_num == 2) ? 4 : 2);
 					packet_num++;
 				} else {
+					run_script(NULL, "leasefail");
 					if (client_config.background_if_no_lease) {
 						LOG(LOG_INFO, "No lease, forking to background.");
 						client_background();


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic