aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-05-26 05:25:12 +0000
committerlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2005-05-26 05:25:12 +0000
commite5b6b0501db821e681027fa6ba63ec2647243e08 (patch)
tree5fe5db78e39b6cd56658925ae4e036453e3b4304
parente8b2349a6ea3213bcae032865399fce5316c5f16 (diff)
downloadbusybox-w32-e5b6b0501db821e681027fa6ba63ec2647243e08.tar.gz
busybox-w32-e5b6b0501db821e681027fa6ba63ec2647243e08.tar.bz2
busybox-w32-e5b6b0501db821e681027fa6ba63ec2647243e08.zip
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. git-svn-id: svn://busybox.net/trunk/busybox@10407 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--networking/udhcp/dhcpc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index 8009bec04..d99711c43 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -439,6 +439,9 @@ int main(int argc, char *argv[])
439 (unsigned long) packet.xid, xid); 439 (unsigned long) packet.xid, xid);
440 continue; 440 continue;
441 } 441 }
442 /* Ignore packets that aren't for us */
443 if (memcmp(client_config.arp,packet.chaddr,6))
444 continue;
442 445
443 if ((message = get_option(&packet, DHCP_MESSAGE_TYPE)) == NULL) { 446 if ((message = get_option(&packet, DHCP_MESSAGE_TYPE)) == NULL) {
444 DEBUG(LOG_ERR, "couldnt get option from packet -- ignoring"); 447 DEBUG(LOG_ERR, "couldnt get option from packet -- ignoring");