projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b2d02e
)
Tobias Krawutschke found a bug where the DHCP client would accept packets
author
Rob Landley
<rob@landley.net>
Thu, 26 May 2005 05:25:12 +0000
(
05:25
-0000)
committer
Rob Landley
<rob@landley.net>
Thu, 26 May 2005 05:25:12 +0000
(
05:25
-0000)
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.
networking/udhcp/dhcpc.c
patch
|
blob
|
history
diff --git
a/networking/udhcp/dhcpc.c
b/networking/udhcp/dhcpc.c
index 8009bec041a2785a9f4624b6ceece60578fc9cf0..d99711c436bc3cc8b3ecb6d1484d299461c6a6e7 100644
(file)
--- a/
networking/udhcp/dhcpc.c
+++ b/
networking/udhcp/dhcpc.c
@@
-439,6
+439,9
@@
int main(int argc, char *argv[])
(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");