summaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpc.c
diff options
context:
space:
mode:
authorDenys Vlasenko2017-06-28 19:18:17 +0200
committerDenys Vlasenko2017-06-28 19:18:17 +0200
commitba4fbca8a81d765f81aefc74db7f73ec9ded3550 (patch)
tree3790acaa5ef3c682831aa15428beb313eea5dcb7 /networking/udhcp/dhcpc.c
parentae2b9f286c985394410aec19b12c1ebecfbe20f6 (diff)
downloadbusybox-ba4fbca8a81d765f81aefc74db7f73ec9ded3550.zip
busybox-ba4fbca8a81d765f81aefc74db7f73ec9ded3550.tar.gz
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 6aa6731..1a66c61 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -1346,7 +1346,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
char *optstr = llist_pop(&list_O);
unsigned n = bb_strtou(optstr, NULL, 0);
if (errno || n > 254) {
- n = udhcp_option_idx(optstr);
+ n = udhcp_option_idx(optstr, dhcp_option_strings);
n = dhcp_optflags[n].code;
}
client_config.opt_mask[n >> 3] |= 1 << (n & 7);
@@ -1366,7 +1366,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
*colon = ' ';
/* now it looks similar to udhcpd's config file line:
* "optname optval", using the common routine: */
- udhcp_str2optset(optstr, &client_config.options);
+ udhcp_str2optset(optstr, &client_config.options, dhcp_optflags, dhcp_option_strings);
if (colon)
*colon = ':'; /* restore it for NOMMU reexec */
}