mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-28 21:07:43 +00:00
Add missing break to fix POOL permit parse. Fix address range warning.
This commit is contained in:
parent
64ba83870f
commit
e5e41be4c5
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: confpars.c,v 1.67 1999/03/26 19:19:45 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
|
"$Id: confpars.c,v 1.68 1999/03/29 18:59:54 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@ -698,7 +698,8 @@ void parse_pool_statement (cfile, group, type)
|
|||||||
if (!parse_lbrace (cfile))
|
if (!parse_lbrace (cfile))
|
||||||
return;
|
return;
|
||||||
do {
|
do {
|
||||||
switch (peek_token (&val, cfile)) {
|
token = peek_token (&val, cfile);
|
||||||
|
switch (token) {
|
||||||
case RANGE:
|
case RANGE:
|
||||||
next_token (&val, cfile);
|
next_token (&val, cfile);
|
||||||
parse_address_range (cfile, group, type, pool);
|
parse_address_range (cfile, group, type, pool);
|
||||||
@ -772,6 +773,8 @@ void parse_pool_statement (cfile, group, type)
|
|||||||
permit -> class = find_class (val);
|
permit -> class = find_class (val);
|
||||||
if (!permit -> class)
|
if (!permit -> class)
|
||||||
parse_warn ("no such class: %s", val);
|
parse_warn ("no such class: %s", val);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
parse_warn ("expecting permit type.");
|
parse_warn ("expecting permit type.");
|
||||||
skip_to_semi (cfile);
|
skip_to_semi (cfile);
|
||||||
@ -970,7 +973,7 @@ struct class *parse_class_declaration (cfile, group, type)
|
|||||||
enum dhcp_token token;
|
enum dhcp_token token;
|
||||||
struct class *class = (struct class *)0, *pc;
|
struct class *class = (struct class *)0, *pc;
|
||||||
int declaration = 0;
|
int declaration = 0;
|
||||||
int lose;
|
int lose = 0;
|
||||||
struct data_string data;
|
struct data_string data;
|
||||||
char *name;
|
char *name;
|
||||||
struct executable_statement *stmt = (struct executable_statement *)0;
|
struct executable_statement *stmt = (struct executable_statement *)0;
|
||||||
@ -1772,12 +1775,14 @@ void parse_address_range (cfile, group, type, pool)
|
|||||||
for (subnet = share -> subnets;
|
for (subnet = share -> subnets;
|
||||||
subnet; subnet = subnet -> next_sibling) {
|
subnet; subnet = subnet -> next_sibling) {
|
||||||
net = subnet_number (low, subnet -> netmask);
|
net = subnet_number (low, subnet -> netmask);
|
||||||
if (addr_eq (low, subnet -> net))
|
if (addr_eq (net, subnet -> net))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!subnet) {
|
if (!subnet) {
|
||||||
parse_warn ("address range not on network %s",
|
parse_warn ("address range not on network %s",
|
||||||
group -> shared_network -> name);
|
group -> shared_network -> name);
|
||||||
|
log_error ("Be sure to place pool statement after %s",
|
||||||
|
"related subnet declarations.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1811,7 +1816,8 @@ void parse_address_range (cfile, group, type, pool)
|
|||||||
pool -> permit_list =
|
pool -> permit_list =
|
||||||
new_permit ("parse_address_range");
|
new_permit ("parse_address_range");
|
||||||
if (!pool -> permit_list)
|
if (!pool -> permit_list)
|
||||||
log_fatal ("no memory for ad-hoc permit.");
|
log_fatal ("no memory for ad-hoc %s.",
|
||||||
|
"permit");
|
||||||
pool -> permit_list -> type =
|
pool -> permit_list -> type =
|
||||||
permit_dynamic_bootp_clients;
|
permit_dynamic_bootp_clients;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user