Commit 214cc905 authored by Anton Persson's avatar Anton Persson Committed by Tom Rini

bootp: Prevent u-boot from using others responses.

In rare circumstances two dhcp clients may generate the same
bootp ID. If this happens it is vital that the client also checks
the hw address in the received response to prevent IP address conflicts.
Signed-off-by: default avatarAnton Persson <don.juanton@gmail.com>
parent a481a156
......@@ -132,6 +132,8 @@ static int check_reply_packet(uchar *pkt, unsigned dest, unsigned src,
retval = -5;
else if (!bootp_match_id(net_read_u32(&bp->bp_id)))
retval = -6;
else if (memcmp(bp->bp_chaddr, net_ethaddr, HWL_ETHER) != 0)
retval = -7;
debug("Filtering pkt = %d\n", retval);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment