net: Quietly ignore DHCP Option 28 (Broadcast Address)
[oweals/u-boot.git] / net / bootp.c
index 0f0867b1c492dd65bbae9575c55636179f85aae5..661e371063ac6273d0f3302ca0d85f12e1c4a1dd 100644 (file)
 #include <command.h>
 #include <net.h>
 #include "bootp.h"
-#include "net_rand.h"
 #include "tftp.h"
 #include "nfs.h"
 #ifdef CONFIG_STATUS_LED
 #include <status_led.h>
 #endif
+#ifdef CONFIG_BOOTP_RANDOM_DELAY
+#include "net_rand.h"
+#endif
 
 #define BOOTP_VENDOR_MAGIC     0x63825363      /* RFC1048 Magic Cookie */
 
@@ -328,7 +330,7 @@ BootpTimeout(void)
        if (BootpTry >= TIMEOUT_COUNT) {
 #ifdef CONFIG_BOOTP_MAY_FAIL
                puts("\nRetry count exceeded\n");
-               NetSetState(NETLOOP_FAIL);
+               net_set_state(NETLOOP_FAIL);
 #else
                puts("\nRetry count exceeded; starting again\n");
                NetStartAgain();
@@ -726,6 +728,8 @@ static void DhcpOptionsProcess(uchar *popt, struct Bootp_t *bp)
                        memcpy(&NetOurRootPath, popt + 2, size);
                        NetOurRootPath[size] = 0;
                        break;
+               case 28:        /* Ignore Broadcast Address Option */
+                       break;
 #if defined(CONFIG_CMD_SNTP) && defined(CONFIG_BOOTP_NTPSERVER)
                case 42:        /* NTP server IP */
                        NetCopyIP(&NetNtpServerIP, (popt + 2));