diff options
| -rw-r--r-- | README | 7 | ||||
| -rw-r--r-- | net/bootp.c | 5 | 
2 files changed, 12 insertions, 0 deletions
| @@ -1592,10 +1592,17 @@ The following options need to be configured:  		CONFIG_BOOTP_NTPSERVER  		CONFIG_BOOTP_TIMEOFFSET  		CONFIG_BOOTP_VENDOREX +		CONFIG_BOOTP_MAY_FAIL  		CONFIG_BOOTP_SERVERIP - TFTP server will be the serverip  		environment variable, not the BOOTP server. +		CONFIG_BOOTP_MAY_FAIL - If the DHCP server is not found +		after the configured retry count, the call will fail +		instead of starting over.  This can be used to fail over +		to Link-local IP address configuration if the DHCP server +		is not available. +  		CONFIG_BOOTP_DNS2 - If a DHCP client requests the DNS  		serverip from a DHCP server, it is possible that more  		than one DNS serverip is offered to the client. diff --git a/net/bootp.c b/net/bootp.c index 7e24b661d..0f0867b1c 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -326,8 +326,13 @@ static void  BootpTimeout(void)  {  	if (BootpTry >= TIMEOUT_COUNT) { +#ifdef CONFIG_BOOTP_MAY_FAIL +		puts("\nRetry count exceeded\n"); +		NetSetState(NETLOOP_FAIL); +#else  		puts("\nRetry count exceeded; starting again\n");  		NetStartAgain(); +#endif  	} else {  		NetSetTimeout(TIMEOUT, BootpTimeout);  		BootpRequest(); |