[BusyBox-cvs] svn commit: trunk/busybox/networking/udhcp
landley at busybox.net
landley at busybox.net
Thu May 26 05:25:13 UTC 2005
Author: landley
Date: 2005-05-25 23:25:12 -0600 (Wed, 25 May 2005)
New Revision: 10407
Log:
Tobias Krawutschke found a bug where the DHCP client would accept packets
with the wrong ARP address, meaning we could easily get somebody else's IP.
That is a bad thing, and this is the minimal two-line fix.
Modified:
trunk/busybox/networking/udhcp/dhcpc.c
Changeset:
Modified: trunk/busybox/networking/udhcp/dhcpc.c
===================================================================
--- trunk/busybox/networking/udhcp/dhcpc.c 2005-05-26 03:31:30 UTC (rev 10406)
+++ trunk/busybox/networking/udhcp/dhcpc.c 2005-05-26 05:25:12 UTC (rev 10407)
@@ -439,6 +439,9 @@
(unsigned long) packet.xid, xid);
continue;
}
+ /* Ignore packets that aren't for us */
+ if (memcmp(client_config.arp,packet.chaddr,6))
+ continue;
if ((message = get_option(&packet, DHCP_MESSAGE_TYPE)) == NULL) {
DEBUG(LOG_ERR, "couldnt get option from packet -- ignoring");
More information about the busybox-cvs
mailing list