summaryrefslogtreecommitdiff
path: root/net/bootp.c
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2012-05-23 07:59:19 +0000
committerJoe Hershberger <joe.hershberger@ni.com>2012-05-23 17:53:05 -0500
commit2c00e099fe77b014dd094a49113e2c6ce8a24a16 (patch)
tree8fd179098f867dbdf817881fa3fc350c0606c4e5 /net/bootp.c
parent1752f0fdc7a3b914f6b651f68cb59dde102c9c92 (diff)
net: Add option CONFIG_BOOTP_MAY_FAIL
This is useful if you want to look for a DHCP server, but try some other settings if not available. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'net/bootp.c')
-rw-r--r--net/bootp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/bootp.c b/net/bootp.c
index 7e24b661de4..0f0867b1c49 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();