summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/confpars.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/server/confpars.c b/server/confpars.c
index 8a055ea4..352adccc 100644
--- a/server/confpars.c
+++ b/server/confpars.c
@@ -34,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: confpars.c,v 1.143.2.35 2007/05/01 20:42:56 each Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
+"$Id: confpars.c,v 1.143.2.36 2007/05/03 21:13:52 each Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -1288,13 +1288,19 @@ void parse_pool_statement (cfile, group, type)
shared_network_reference (&pool -> shared_network,
group -> subnet -> shared_network,
MDL);
- else
+ else if (type == SHARED_NET_DECL)
shared_network_reference (&pool -> shared_network,
group -> shared_network, MDL);
+ else {
+ parse_warn(cfile, "Dynamic pools are only valid inside "
+ "subnet or shared-network statements.");
+ skip_to_semi(cfile);
+ return;
+ }
- if (group->shared_network == NULL ||
- !clone_group (&pool -> group, pool -> shared_network -> group, MDL))
- log_fatal ("can't clone pool group.");
+ if (pool->shared_network == NULL ||
+ !clone_group(&pool->group, pool->shared_network->group, MDL))
+ log_fatal("can't clone pool group.");
#if defined (FAILOVER_PROTOCOL)
/* Inherit the failover peer from the shared network. */