mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-09-01 06:45:27 +00:00
Add support for arbitrary parenthetical expressions.
This commit is contained in:
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: parse.c,v 1.76 2000/06/29 20:05:18 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
|
"$Id: parse.c,v 1.77 2000/07/06 09:57:23 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@@ -2441,6 +2441,26 @@ int parse_non_binary (expr, cfile, lose, context)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case LPAREN:
|
||||||
|
token = next_token (&val, cfile);
|
||||||
|
if (!parse_expression (expr, cfile, lose, context,
|
||||||
|
(struct expression **)0, expr_none)) {
|
||||||
|
if (!*lose) {
|
||||||
|
parse_warn (cfile, "expression expected");
|
||||||
|
skip_to_semi (cfile);
|
||||||
|
}
|
||||||
|
*lose = 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
token = next_token (&val, cfile);
|
||||||
|
if (token != RPAREN) {
|
||||||
|
*lose = 1;
|
||||||
|
parse_warn (cfile, "right paren expected");
|
||||||
|
skip_to_semi (cfile);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case EXISTS:
|
case EXISTS:
|
||||||
if (context == context_dns)
|
if (context == context_dns)
|
||||||
goto ns_exists;
|
goto ns_exists;
|
||||||
|
Reference in New Issue
Block a user