aboutsummaryrefslogtreecommitdiff
path: root/toys/pending
diff options
context:
space:
mode:
authorErik Moqvist <erik.moqvist@gmail.com>2020-06-05 19:04:00 +0200
committerRob Landley <rob@landley.net>2020-06-05 20:49:53 -0500
commitf8e62d2283d28bbc15798636529efcefe6f99a8b (patch)
tree6a673cf3e8365e5535ff96d102f591b458e8fea0 /toys/pending
parentaef40f69d2dda3c6e4c0963fdde715bdfc708c1f (diff)
downloadtoybox-f8e62d2283d28bbc15798636529efcefe6f99a8b.tar.gz
Fix DNS 2 is the DHCP client.
Diffstat (limited to 'toys/pending')
-rw-r--r--toys/pending/dhcp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/toys/pending/dhcp.c b/toys/pending/dhcp.c
index 2dd392dc..be8d4947 100644
--- a/toys/pending/dhcp.c
+++ b/toys/pending/dhcp.c
@@ -1136,12 +1136,14 @@ static uint8_t dhcpc_parseoptions(dhcpc_result_t *presult, uint8_t *optptr)
msgopt_list[count].len = strlen(toybuf);
break;
case DHCP_IPLIST:
+ options = &optptr[2];
optlen = optptr[1];
dest = toybuf;
while (optlen) {
- memcpy(&convtmp, &optptr[2], sizeof(uint32_t));
+ memcpy(&convtmp, options, sizeof(uint32_t));
addr.s_addr = convtmp;
dest += sprintf(dest, "%s ", inet_ntoa(addr));
+ options += 4;
optlen -= 4;
}
*(dest - 1) = '\0';