浏览代码

[dhcp] Ignore ProxyDHCPACKs without PXE options

Suggested-by: Wissam Shoukair <wissams@mellanox.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 9 年前
父节点
当前提交
0a34c2aab9
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4
    0
      src/net/udp/dhcp.c

+ 4
- 0
src/net/udp/dhcp.c 查看文件

@@ -670,6 +670,8 @@ static void dhcp_proxy_rx ( struct dhcp_session *dhcp,
670 670
 		DBGC ( dhcp, " (%s/", inet_ntoa ( server_id ) );
671 671
 		DBGC ( dhcp, "%s)", inet_ntoa ( pseudo_id ) );
672 672
 	}
673
+	if ( dhcp_has_pxeopts ( dhcppkt ) )
674
+		DBGC ( dhcp, " pxe" );
673 675
 	DBGC ( dhcp, "\n" );
674 676
 
675 677
 	/* Filter out unacceptable responses */
@@ -679,6 +681,8 @@ static void dhcp_proxy_rx ( struct dhcp_session *dhcp,
679 681
 		return;
680 682
 	if ( ( pseudo_id.s_addr != dhcp->proxy_server.s_addr ) )
681 683
 		return;
684
+	if ( ! dhcp_has_pxeopts ( dhcppkt ) )
685
+		return;
682 686
 
683 687
 	/* Register settings */
684 688
 	if ( ( rc = register_settings ( settings, NULL,

正在加载...
取消
保存