|
@@ -436,6 +436,15 @@ static void dhcp_discovery_rx ( struct dhcp_session *dhcp,
|
436
|
436
|
static void dhcp_discovery_expired ( struct dhcp_session *dhcp ) {
|
437
|
437
|
unsigned long elapsed = ( currticks() - dhcp->start );
|
438
|
438
|
|
|
439
|
+ /* If link is blocked, defer DHCP discovery (and reset timeout) */
|
|
440
|
+ if ( netdev_link_blocked ( dhcp->netdev ) ) {
|
|
441
|
+ DBGC ( dhcp, "DHCP %p deferring discovery\n", dhcp );
|
|
442
|
+ start_timer_fixed ( &dhcp->timer,
|
|
443
|
+ ( DHCP_DISC_START_TIMEOUT_SEC *
|
|
444
|
+ TICKS_PER_SEC ) );
|
|
445
|
+ return;
|
|
446
|
+ }
|
|
447
|
+
|
439
|
448
|
/* Give up waiting for ProxyDHCP before we reach the failure point */
|
440
|
449
|
if ( dhcp->offer.s_addr &&
|
441
|
450
|
( elapsed > DHCP_DISC_PROXY_TIMEOUT_SEC * TICKS_PER_SEC ) ) {
|