aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/d6_dhcpc.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-04-13 13:18:34 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2018-04-13 13:27:52 +0200
commit266f6f19732f9b35487a87a346e58c1c3a0af43d (patch)
tree10489c89deea2665170fd4006c11b951dc284ee9 /networking/udhcp/d6_dhcpc.c
parent46158dc833ca48a63a2547bb26eee133aa19dccf (diff)
downloadbusybox-266f6f19732f9b35487a87a346e58c1c3a0af43d.tar.gz
udhcp: support string user options, closes 10946
function old new delta udhcp_str2optset 536 628 +92 packed_usage 32757 32760 +3 udhcpc_main 2708 2692 -16 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 95/-16) Total: 79 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/d6_dhcpc.c')
-rw-r--r--networking/udhcp/d6_dhcpc.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/networking/udhcp/d6_dhcpc.c b/networking/udhcp/d6_dhcpc.c
index 289df66ee..85d9da724 100644
--- a/networking/udhcp/d6_dhcpc.c
+++ b/networking/udhcp/d6_dhcpc.c
@@ -1063,6 +1063,7 @@ static void client_background(void)
//usage: "\n -x hostname:bbox - option 12"
//usage: "\n -x lease:3600 - option 51 (lease time)"
//usage: "\n -x 0x3d:0100BEEFC0FFEE - option 61 (client id)"
+//usage: "\n -x 14:'\"dumpfile\"' - option 14 (shell-quoted)"
//usage: IF_UDHCP_VERBOSE(
//usage: "\n -v Verbose"
//usage: )
@@ -1155,15 +1156,9 @@ int udhcpc6_main(int argc UNUSED_PARAM, char **argv)
}
}
while (list_x) {
- char *optstr = llist_pop(&list_x);
- char *colon = strchr(optstr, ':');
- if (colon)
- *colon = ' ';
- /* now it looks similar to udhcpd's config file line:
- * "optname optval", using the common routine: */
+ char *optstr = xstrdup(llist_pop(&list_x));
udhcp_str2optset(optstr, &client_config.options, d6_optflags, d6_option_strings);
- if (colon)
- *colon = ':'; /* restore it for NOMMU reexec */
+ free(optstr);
}
if (d6_read_interface(client_config.interface,