mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-30 13:57:50 +00:00
Make dummy parse_allow_deny. Allow empty request lists.
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: clparse.c,v 1.37 1999/10/12 16:00:17 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium. All rights reserved.\n";
|
"$Id: clparse.c,v 1.38 1999/11/13 23:46:46 mellon Exp $ Copyright (c) 1997 The Internet Software Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@@ -60,7 +60,7 @@ isc_result_t read_client_conf ()
|
|||||||
isc_result_t status;
|
isc_result_t status;
|
||||||
|
|
||||||
/* Set up the initial dhcp option universe. */
|
/* Set up the initial dhcp option universe. */
|
||||||
initialize_universes ();
|
initialize_common_option_spaces ();
|
||||||
|
|
||||||
/* Initialize the top level client configuration. */
|
/* Initialize the top level client configuration. */
|
||||||
memset (&top_level_config, 0, sizeof top_level_config);
|
memset (&top_level_config, 0, sizeof top_level_config);
|
||||||
@@ -549,6 +549,8 @@ void parse_option_list (cfile, list)
|
|||||||
ix = 0;
|
ix = 0;
|
||||||
do {
|
do {
|
||||||
token = next_token (&val, cfile);
|
token = next_token (&val, cfile);
|
||||||
|
if (token == SEMI)
|
||||||
|
break;
|
||||||
if (!is_identifier (token)) {
|
if (!is_identifier (token)) {
|
||||||
parse_warn (cfile, "expected option name.");
|
parse_warn (cfile, "expected option name.");
|
||||||
skip_to_semi (cfile);
|
skip_to_semi (cfile);
|
||||||
@@ -583,19 +585,22 @@ void parse_option_list (cfile, list)
|
|||||||
}
|
}
|
||||||
if (*list)
|
if (*list)
|
||||||
dfree (*list, "parse_option_list");
|
dfree (*list, "parse_option_list");
|
||||||
*list = dmalloc ((ix + 1) * sizeof **list, "parse_option_list");
|
if (ix) {
|
||||||
if (!*list)
|
*list = dmalloc ((ix + 1) * sizeof **list,
|
||||||
log_error ("no memory for option list.");
|
"parse_option_list");
|
||||||
else {
|
if (!*list)
|
||||||
ix = 0;
|
log_error ("no memory for option list.");
|
||||||
for (q = p; q; q = q -> cdr)
|
else {
|
||||||
(*list) [ix++] = (u_int32_t)q -> car;
|
ix = 0;
|
||||||
(*list) [ix] = 0;
|
for (q = p; q; q = q -> cdr)
|
||||||
}
|
(*list) [ix++] = (u_int32_t)q -> car;
|
||||||
while (p) {
|
(*list) [ix] = 0;
|
||||||
q = p -> cdr;
|
}
|
||||||
free_pair (p, "parse_option_list");
|
while (p) {
|
||||||
p = q;
|
q = p -> cdr;
|
||||||
|
free_pair (p, "parse_option_list");
|
||||||
|
p = q;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1223,3 +1228,25 @@ void parse_reject_statement (cfile, config)
|
|||||||
skip_to_semi (cfile);
|
skip_to_semi (cfile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* allow-deny-keyword :== BOOTP
|
||||||
|
| BOOTING
|
||||||
|
| DYNAMIC_BOOTP
|
||||||
|
| UNKNOWN_CLIENTS */
|
||||||
|
|
||||||
|
int parse_allow_deny (oc, cfile, flag)
|
||||||
|
struct option_cache **oc;
|
||||||
|
struct parse *cfile;
|
||||||
|
int flag;
|
||||||
|
{
|
||||||
|
enum dhcp_token token;
|
||||||
|
const char *val;
|
||||||
|
unsigned char rf = flag;
|
||||||
|
struct expression *data = (struct expression *)0;
|
||||||
|
int status;
|
||||||
|
|
||||||
|
parse_warn (cfile, "allow/deny/ignore not permitted here.");
|
||||||
|
skip_to_semi (cfile);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user