diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-06-28 19:18:17 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-06-28 19:18:17 +0200 |
commit | ba4fbca8a81d765f81aefc74db7f73ec9ded3550 (patch) | |
tree | 3790acaa5ef3c682831aa15428beb313eea5dcb7 /networking/udhcp/dhcpd.c | |
parent | ae2b9f286c985394410aec19b12c1ebecfbe20f6 (diff) | |
download | busybox-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/dhcpd.c')
-rw-r--r-- | networking/udhcp/dhcpd.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c index 5eff026bc..3a5fc2db7 100644 --- a/networking/udhcp/dhcpd.c +++ b/networking/udhcp/dhcpd.c | |||
@@ -361,6 +361,10 @@ static int FAST_FUNC read_staticlease(const char *const_line, void *arg) | |||
361 | return 1; | 361 | return 1; |
362 | } | 362 | } |
363 | 363 | ||
364 | static int FAST_FUNC read_optset(const char *line, void *arg) { | ||
365 | return udhcp_str2optset(line, arg, dhcp_optflags, dhcp_option_strings); | ||
366 | } | ||
367 | |||
364 | struct config_keyword { | 368 | struct config_keyword { |
365 | const char *keyword; | 369 | const char *keyword; |
366 | int (*handler)(const char *line, void *var) FAST_FUNC; | 370 | int (*handler)(const char *line, void *var) FAST_FUNC; |
@@ -387,8 +391,8 @@ static const struct config_keyword keywords[] = { | |||
387 | {"pidfile" , read_str , OFS(pidfile ), "/var/run/udhcpd.pid"}, | 391 | {"pidfile" , read_str , OFS(pidfile ), "/var/run/udhcpd.pid"}, |
388 | {"siaddr" , udhcp_str2nip , OFS(siaddr_nip ), "0.0.0.0"}, | 392 | {"siaddr" , udhcp_str2nip , OFS(siaddr_nip ), "0.0.0.0"}, |
389 | /* keywords with no defaults must be last! */ | 393 | /* keywords with no defaults must be last! */ |
390 | {"option" , udhcp_str2optset, OFS(options ), ""}, | 394 | {"option" , read_optset , OFS(options ), ""}, |
391 | {"opt" , udhcp_str2optset, OFS(options ), ""}, | 395 | {"opt" , read_optset , OFS(options ), ""}, |
392 | {"notify_file" , read_str , OFS(notify_file ), NULL}, | 396 | {"notify_file" , read_str , OFS(notify_file ), NULL}, |
393 | {"sname" , read_str , OFS(sname ), NULL}, | 397 | {"sname" , read_str , OFS(sname ), NULL}, |
394 | {"boot_file" , read_str , OFS(boot_file ), NULL}, | 398 | {"boot_file" , read_str , OFS(boot_file ), NULL}, |