From: Michael Brown Date: Sun, 22 Jan 2017 09:12:52 +0000 (+0000) Subject: [ipv4] Accept unicast packets for the local network broadcast address X-Git-Tag: v1.20.1~340 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43b2d8eafb2c1ac568d43be5491cc5b441c6c5e5;p=thirdparty%2Fipxe.git [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 Tested-by: Roy Ledochowski Signed-off-by: Michael Brown --- diff --git a/src/net/ipv4.c b/src/net/ipv4.c index b4148d8e0..b9ce5e7f7 100644 --- a/src/net/ipv4.c +++ b/src/net/ipv4.c @@ -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 "