From ba4fbca8a81d765f81aefc74db7f73ec9ded3550 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 28 Jun 2017 19:18:17 +0200 Subject: udhcpc6: make -O OPT work Patch is based on work by tiggerswelt.net. Signed-off-by: Denys Vlasenko --- networking/udhcp/dhcpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'networking/udhcp/dhcpc.c') 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) 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 */ } -- cgit v1.2.3