aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpc.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-06-17 11:57:09 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-06-17 11:57:09 +0200
commit31af3d5a1dbc750d8646f948ce642e6ae57ce880 (patch)
tree37d72b13f986b1da25def340771b49be4dd3028b /networking/udhcp/dhcpc.c
parentac906fa85e61b4e34161709de777616f858bc945 (diff)
downloadbusybox-w32-31af3d5a1dbc750d8646f948ce642e6ae57ce880.tar.gz
busybox-w32-31af3d5a1dbc750d8646f948ce642e6ae57ce880.tar.bz2
busybox-w32-31af3d5a1dbc750d8646f948ce642e6ae57ce880.zip
udhcp: shorten mac len from 16 to 6 in lease file
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/dhcpc.c')
-rw-r--r--networking/udhcp/dhcpc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index eed9d9a01..41bb0b09c 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -149,7 +149,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
149 int max_fd; 149 int max_fd;
150 int retval; 150 int retval;
151 struct timeval tv; 151 struct timeval tv;
152 struct dhcpMessage packet; 152 struct dhcp_packet packet;
153 fd_set rfds; 153 fd_set rfds;
154 154
155#if ENABLE_GETOPT_LONG 155#if ENABLE_GETOPT_LONG
@@ -498,7 +498,9 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
498 } 498 }
499 499
500 /* Ignore packets that aren't for us */ 500 /* Ignore packets that aren't for us */
501 if (memcmp(packet.chaddr, client_config.client_mac, 6)) { 501 if (packet.hlen != 6
502 || memcmp(packet.chaddr, client_config.client_mac, 6)
503 ) {
502//FIXME: need to also check that last 10 bytes are zero 504//FIXME: need to also check that last 10 bytes are zero
503 log1("chaddr does not match, ignoring packet"); // log2? 505 log1("chaddr does not match, ignoring packet"); // log2?
504 continue; 506 continue;