mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-31 14:25:41 +00:00
- Strict checks for content of domain-name DHCPv4 option can now be
configured during compilation time. Even though RFC2132 does not allow to store more than one domain in domain-name option, such behavior is now enabled by default, but this may change some time in the future. See ACCEPT_LIST_IN_DOMAIN_NAME define in includes/site.h. [ISC-Bugs #24167]
This commit is contained in:
@@ -3324,6 +3324,33 @@ int parse_boolean_expression (expr, cfile, lose)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* boolean :== ON SEMI | OFF SEMI | TRUE SEMI | FALSE SEMI */
|
||||
|
||||
int parse_boolean (cfile)
|
||||
struct parse *cfile;
|
||||
{
|
||||
enum dhcp_token token;
|
||||
const char *val;
|
||||
int rv;
|
||||
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
if (!strcasecmp (val, "true")
|
||||
|| !strcasecmp (val, "on"))
|
||||
rv = 1;
|
||||
else if (!strcasecmp (val, "false")
|
||||
|| !strcasecmp (val, "off"))
|
||||
rv = 0;
|
||||
else {
|
||||
parse_warn (cfile,
|
||||
"boolean value (true/false/on/off) expected");
|
||||
skip_to_semi (cfile);
|
||||
return 0;
|
||||
}
|
||||
parse_semi (cfile);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* data_expression :== SUBSTRING LPAREN data-expression COMMA
|
||||
* numeric-expression COMMA
|
||||
|
Reference in New Issue
Block a user