提交 ee0f60df 编写于 作者: B Brian Rzycki 提交者: Joe Hershberger

net: Quietly ignore DHCP Option 28 (Broadcast Address)

Some DHCP servers (notably dnsmasq) always transmit DHCP Option 28,
Broadcast Address as specified in RFC 2132. Without this patch u-boot
displays the warning:
  *** Unhandled DHCP Option in OFFER/ACK: 28

The patch suppresses the warning and ignores DHCP Option 28. There is
no environment variable to set the broadcast address into and if for
some reason u-boot needs the broadcast it can be calculated from
ipaddr and netmask.
Signed-off-by: NBrian Rzycki <bmr@freescale.com>
上级 a655938a
...@@ -728,6 +728,8 @@ static void DhcpOptionsProcess(uchar *popt, struct Bootp_t *bp) ...@@ -728,6 +728,8 @@ static void DhcpOptionsProcess(uchar *popt, struct Bootp_t *bp)
memcpy(&NetOurRootPath, popt + 2, size); memcpy(&NetOurRootPath, popt + 2, size);
NetOurRootPath[size] = 0; NetOurRootPath[size] = 0;
break; break;
case 28: /* Ignore Broadcast Address Option */
break;
#if defined(CONFIG_CMD_SNTP) && defined(CONFIG_BOOTP_NTPSERVER) #if defined(CONFIG_CMD_SNTP) && defined(CONFIG_BOOTP_NTPSERVER)
case 42: /* NTP server IP */ case 42: /* NTP server IP */
NetCopyIP(&NetNtpServerIP, (popt + 2)); NetCopyIP(&NetNtpServerIP, (popt + 2));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册