diff options
Diffstat (limited to 'sbin/dhclient/clparse.c')
-rw-r--r-- | sbin/dhclient/clparse.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sbin/dhclient/clparse.c b/sbin/dhclient/clparse.c index 33f1f8c8c26..c22072c6696 100644 --- a/sbin/dhclient/clparse.c +++ b/sbin/dhclient/clparse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clparse.c,v 1.47 2012/11/27 14:14:16 krw Exp $ */ +/* $OpenBSD: clparse.c,v 1.48 2012/11/27 15:51:48 krw Exp $ */ /* Parser for dhclient config and lease files... */ @@ -154,7 +154,7 @@ void parse_client_statement(FILE *cfile) { u_int8_t optlist[256]; - int token, code, count, i; + int token, code, count; switch (next_token(NULL, cfile)) { case TOK_SEND: @@ -170,11 +170,6 @@ parse_client_statement(FILE *cfile) if (code != -1) config->default_actions[code] = ACTION_SUPERSEDE; return; - case TOK_IGNORE: - count = parse_option_list(cfile, optlist, sizeof(optlist)); - for (i = 0; i < count; i++) - config->default_actions[optlist[i]] = ACTION_IGNORE; - return; case TOK_APPEND: code = parse_option_decl(cfile, &config->defaults[0]); if (code != -1) @@ -207,6 +202,14 @@ parse_client_statement(FILE *cfile) sizeof(config->required_options)); } return; + case TOK_IGNORE: + count = parse_option_list(cfile, optlist, sizeof(optlist)); + if (count > 0) { + config->ignored_option_count = count; + memcpy(config->ignored_options, optlist, + sizeof(config->ignored_options)); + } + return; case TOK_LINK_TIMEOUT: parse_lease_time(cfile, &config->link_timeout); return; |