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) |
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) return 1; } +static int FAST_FUNC read_optset(const char *line, void *arg) { + return udhcp_str2optset(line, arg, dhcp_optflags, dhcp_option_strings); +} + struct config_keyword { const char *keyword; int (*handler)(const char *line, void *var) FAST_FUNC; @@ -387,8 +391,8 @@ static const struct config_keyword keywords[] = { {"pidfile" , read_str , OFS(pidfile ), "/var/run/udhcpd.pid"}, {"siaddr" , udhcp_str2nip , OFS(siaddr_nip ), "0.0.0.0"}, /* keywords with no defaults must be last! */ - {"option" , udhcp_str2optset, OFS(options ), ""}, - {"opt" , udhcp_str2optset, OFS(options ), ""}, + {"option" , read_optset , OFS(options ), ""}, + {"opt" , read_optset , OFS(options ), ""}, {"notify_file" , read_str , OFS(notify_file ), NULL}, {"sname" , read_str , OFS(sname ), NULL}, {"boot_file" , read_str , OFS(boot_file ), NULL}, |