瀏覽代碼

[ipv4] Accept unicast packets for the local network broadcast address

The ISC Kea DHCP server transmits its DHCPOFFER as a unicast packet
with a broadcast IPv4 destination address (255.255.255.255).  This
combination is currently rejected by iPXE.

Fix by explicitly accepting the local network broadcast address
(255.255.255.255) as a valid unicast destination address.

Reported-by: Roy Ledochowski <roy.ledochowski@hpe.com>
Tested-by: Roy Ledochowski <roy.ledochowski@hpe.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 7 年之前
父節點
當前提交
43b2d8eafb
共有 1 個檔案被更改,包括 1 行新增0 行删除
  1. 1
    0
      src/net/ipv4.c

+ 1
- 0
src/net/ipv4.c 查看文件

@@ -552,6 +552,7 @@ static int ipv4_rx ( struct io_buffer *iobuf,
552 552
 
553 553
 	/* Discard unicast packets not destined for us */
554 554
 	if ( ( ! ( flags & LL_MULTICAST ) ) &&
555
+	     ( iphdr->dest.s_addr != INADDR_BROADCAST ) &&
555 556
 	     ipv4_has_any_addr ( netdev ) &&
556 557
 	     ( ! ipv4_has_addr ( netdev, iphdr->dest ) ) ) {
557 558
 		DBGC ( iphdr->src, "IPv4 discarding non-local unicast packet "

Loading…
取消
儲存