diff options
author | mbr <mbr@FreeBSD.org> | 2003-09-02 11:13:21 +0000 |
---|---|---|
committer | mbr <mbr@FreeBSD.org> | 2003-09-02 11:13:21 +0000 |
commit | 66b631bbce0f76a8ac8b7e449d641bf2d39e2b7b (patch) | |
tree | dcd797e5b11946dcf5d76a55949bea79832c181f /contrib/isc-dhcp/client/clparse.c | |
parent | bc435cf92417e0fa80f81a1072fe670bc5526d51 (diff) | |
download | FreeBSD-src-66b631bbce0f76a8ac8b7e449d641bf2d39e2b7b.zip FreeBSD-src-66b631bbce0f76a8ac8b7e449d641bf2d39e2b7b.tar.gz |
Resolve conflicts.
Diffstat (limited to 'contrib/isc-dhcp/client/clparse.c')
-rw-r--r-- | contrib/isc-dhcp/client/clparse.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/contrib/isc-dhcp/client/clparse.c b/contrib/isc-dhcp/client/clparse.c index c2047dd..e07b3cf 100644 --- a/contrib/isc-dhcp/client/clparse.c +++ b/contrib/isc-dhcp/client/clparse.c @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: clparse.c,v 1.62.2.3 2002/11/17 02:25:43 dhankins Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n" +"$Id: clparse.c,v 1.62.2.4 2003/02/10 00:39:57 dhankins Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n" "$FreeBSD$\n"; #endif /* not lint */ @@ -620,34 +620,41 @@ void parse_option_list (cfile, list) struct parse *cfile; u_int32_t **list; { - int ix, i; + int ix; int token; const char *val; pair p = (pair)0, q, r; + struct option *option; ix = 0; do { - token = next_token (&val, (unsigned *)0, cfile); - if (token == SEMI) + token = peek_token (&val, (unsigned *)0, cfile); + if (token == SEMI) { + token = next_token (&val, (unsigned *)0, cfile); break; + } if (!is_identifier (token)) { parse_warn (cfile, "%s: expected option name.", val); + token = next_token (&val, (unsigned *)0, cfile); skip_to_semi (cfile); return; } - for (i = 0; i < 256; i++) { - if (!strcasecmp (dhcp_options [i].name, val)) - break; - } - if (i == 256) { + option = parse_option_name (cfile, 0, NULL); + if (!option) { parse_warn (cfile, "%s: expected option name.", val); + return; + } + if (option -> universe != &dhcp_universe) { + parse_warn (cfile, + "%s.%s: Only global options allowed.", + option -> universe -> name, option->name ); skip_to_semi (cfile); return; } r = new_pair (MDL); if (!r) log_fatal ("can't allocate pair for option code."); - r -> car = (caddr_t)(long)i; + r -> car = (caddr_t)(long)option -> code; r -> cdr = (pair)0; if (p) q -> cdr = r; |