diff options
author | Tomek Mrugalski <tomek@isc.org> | 2011-04-21 17:53:48 +0000 |
---|---|---|
committer | Tomek Mrugalski <tomek@isc.org> | 2011-04-21 17:53:48 +0000 |
commit | 023fbaa03e1eee300d6267ab927fe540f064eaaf (patch) | |
tree | e28011441fbb5f1b11dcb3e5f61d8a08ca3d1c1e /common/parse.c | |
parent | 73c83820fe45a87d5381f0ef94c89c69fd81fae7 (diff) | |
download | isc-dhcp-023fbaa03e1eee300d6267ab927fe540f064eaaf.tar.gz |
- Parameters configured to evaluate from user defined function calls can
now be correctly written to dhcpd.leases
- If a 'next-server' parameter is configured in a dynamic host record via
OMAPI as a domain name, the syntax written to disk is now correctly parsed
upon restart. [ISC-Bugs #22266]
Diffstat (limited to 'common/parse.c')
-rw-r--r-- | common/parse.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/common/parse.c b/common/parse.c index 865522ee..105df77c 100644 --- a/common/parse.c +++ b/common/parse.c @@ -4551,6 +4551,31 @@ int parse_non_binary (expr, cfile, lose, context) goto norparen; break; + case GETHOSTBYNAME: + token = next_token(&val, NULL, cfile); + + token = next_token(NULL, NULL, cfile); + if (token != LPAREN) + goto nolparen; + + /* The argument is a quoted string. */ + token = next_token(&val, NULL, cfile); + if (token != STRING) { + parse_warn(cfile, "Expecting quoted literal: " + "\"foo.example.com\""); + skip_to_semi(cfile); + *lose = 1; + return 0; + } + if (!make_host_lookup(expr, val)) + log_fatal("Error creating gethostbyname() internal " + "record. (%s:%d)", MDL); + + token = next_token(NULL, NULL, cfile); + if (token != RPAREN) + goto norparen; + break; + /* Not a valid start to an expression... */ default: if (token != NAME && token != NUMBER_OR_NAME) |