summaryrefslogtreecommitdiffstats
path: root/src/net
diff options
context:
space:
mode:
authorMichael Brown2017-01-22 10:12:52 +0100
committerMichael Brown2017-01-22 10:12:52 +0100
commit43b2d8eafb2c1ac568d43be5491cc5b441c6c5e5 (patch)
treed63c92b8a901c5cb6b0e57a15f8c8cb2d3aa780a /src/net
parent[golan] Update Connect-IB, ConnectX-4 and ConnectX-4 Lx (Infiniband) support (diff)
downloadipxe-43b2d8eafb2c1ac568d43be5491cc5b441c6c5e5.tar.gz
ipxe-43b2d8eafb2c1ac568d43be5491cc5b441c6c5e5.tar.xz
ipxe-43b2d8eafb2c1ac568d43be5491cc5b441c6c5e5.zip
[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>
Diffstat (limited to 'src/net')
-rw-r--r--src/net/ipv4.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/net/ipv4.c b/src/net/ipv4.c
index b4148d8e..b9ce5e7f 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 "