]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[ipv4] Accept unicast packets for the local network broadcast address
authorMichael Brown <mcb30@ipxe.org>
Sun, 22 Jan 2017 09:12:52 +0000 (09:12 +0000)
committerMichael Brown <mcb30@ipxe.org>
Sun, 22 Jan 2017 09:12:52 +0000 (09:12 +0000)
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>
src/net/ipv4.c

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