diff options
Diffstat (limited to 'libnetutils/dhcpclient.c')
-rw-r--r-- | libnetutils/dhcpclient.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libnetutils/dhcpclient.c b/libnetutils/dhcpclient.c index 700b02f9b..a05b7cb0d 100644 --- a/libnetutils/dhcpclient.c +++ b/libnetutils/dhcpclient.c | |||
@@ -353,28 +353,28 @@ static int send_message(int sock, int if_index, dhcp_msg *msg, int size) | |||
353 | static int is_valid_reply(dhcp_msg *msg, dhcp_msg *reply, int sz) | 353 | static int is_valid_reply(dhcp_msg *msg, dhcp_msg *reply, int sz) |
354 | { | 354 | { |
355 | if (sz < DHCP_MSG_FIXED_SIZE) { | 355 | if (sz < DHCP_MSG_FIXED_SIZE) { |
356 | if (verbose) ALOGD("netcfg: Wrong size %d != %d\n", sz, DHCP_MSG_FIXED_SIZE); | 356 | if (verbose) ALOGD("Wrong size %d != %d\n", sz, DHCP_MSG_FIXED_SIZE); |
357 | return 0; | 357 | return 0; |
358 | } | 358 | } |
359 | if (reply->op != OP_BOOTREPLY) { | 359 | if (reply->op != OP_BOOTREPLY) { |
360 | if (verbose) ALOGD("netcfg: Wrong Op %d != %d\n", reply->op, OP_BOOTREPLY); | 360 | if (verbose) ALOGD("Wrong Op %d != %d\n", reply->op, OP_BOOTREPLY); |
361 | return 0; | 361 | return 0; |
362 | } | 362 | } |
363 | if (reply->xid != msg->xid) { | 363 | if (reply->xid != msg->xid) { |
364 | if (verbose) ALOGD("netcfg: Wrong Xid 0x%x != 0x%x\n", ntohl(reply->xid), | 364 | if (verbose) ALOGD("Wrong Xid 0x%x != 0x%x\n", ntohl(reply->xid), |
365 | ntohl(msg->xid)); | 365 | ntohl(msg->xid)); |
366 | return 0; | 366 | return 0; |
367 | } | 367 | } |
368 | if (reply->htype != msg->htype) { | 368 | if (reply->htype != msg->htype) { |
369 | if (verbose) ALOGD("netcfg: Wrong Htype %d != %d\n", reply->htype, msg->htype); | 369 | if (verbose) ALOGD("Wrong Htype %d != %d\n", reply->htype, msg->htype); |
370 | return 0; | 370 | return 0; |
371 | } | 371 | } |
372 | if (reply->hlen != msg->hlen) { | 372 | if (reply->hlen != msg->hlen) { |
373 | if (verbose) ALOGD("netcfg: Wrong Hlen %d != %d\n", reply->hlen, msg->hlen); | 373 | if (verbose) ALOGD("Wrong Hlen %d != %d\n", reply->hlen, msg->hlen); |
374 | return 0; | 374 | return 0; |
375 | } | 375 | } |
376 | if (memcmp(msg->chaddr, reply->chaddr, msg->hlen)) { | 376 | if (memcmp(msg->chaddr, reply->chaddr, msg->hlen)) { |
377 | if (verbose) ALOGD("netcfg: Wrong chaddr %x != %x\n", *(reply->chaddr),*(msg->chaddr)); | 377 | if (verbose) ALOGD("Wrong chaddr %x != %x\n", *(reply->chaddr),*(msg->chaddr)); |
378 | return 0; | 378 | return 0; |
379 | } | 379 | } |
380 | return 1; | 380 | return 1; |