aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpc.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-06-28 19:18:17 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-06-28 19:18:17 +0200
commitba4fbca8a81d765f81aefc74db7f73ec9ded3550 (patch)
tree3790acaa5ef3c682831aa15428beb313eea5dcb7 /networking/udhcp/dhcpc.c
parentae2b9f286c985394410aec19b12c1ebecfbe20f6 (diff)
downloadbusybox-w32-ba4fbca8a81d765f81aefc74db7f73ec9ded3550.tar.gz
busybox-w32-ba4fbca8a81d765f81aefc74db7f73ec9ded3550.tar.bz2
busybox-w32-ba4fbca8a81d765f81aefc74db7f73ec9ded3550.zip
udhcpc6: make -O OPT work
Patch is based on work by tiggerswelt.net. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/dhcpc.c')
-rw-r--r--networking/udhcp/dhcpc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index 6aa6731fb..1a66c610e 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -1346,7 +1346,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
1346 char *optstr = llist_pop(&list_O); 1346 char *optstr = llist_pop(&list_O);
1347 unsigned n = bb_strtou(optstr, NULL, 0); 1347 unsigned n = bb_strtou(optstr, NULL, 0);
1348 if (errno || n > 254) { 1348 if (errno || n > 254) {
1349 n = udhcp_option_idx(optstr); 1349 n = udhcp_option_idx(optstr, dhcp_option_strings);
1350 n = dhcp_optflags[n].code; 1350 n = dhcp_optflags[n].code;
1351 } 1351 }
1352 client_config.opt_mask[n >> 3] |= 1 << (n & 7); 1352 client_config.opt_mask[n >> 3] |= 1 << (n & 7);
@@ -1366,7 +1366,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
1366 *colon = ' '; 1366 *colon = ' ';
1367 /* now it looks similar to udhcpd's config file line: 1367 /* now it looks similar to udhcpd's config file line:
1368 * "optname optval", using the common routine: */ 1368 * "optname optval", using the common routine: */
1369 udhcp_str2optset(optstr, &client_config.options); 1369 udhcp_str2optset(optstr, &client_config.options, dhcp_optflags, dhcp_option_strings);
1370 if (colon) 1370 if (colon)
1371 *colon = ':'; /* restore it for NOMMU reexec */ 1371 *colon = ':'; /* restore it for NOMMU reexec */
1372 } 1372 }