summaryrefslogtreecommitdiff
path: root/server/confpars.c
diff options
context:
space:
mode:
Diffstat (limited to 'server/confpars.c')
-rw-r--r--server/confpars.c207
1 files changed, 103 insertions, 104 deletions
diff --git a/server/confpars.c b/server/confpars.c
index 02f0d986..defa0a88 100644
--- a/server/confpars.c
+++ b/server/confpars.c
@@ -198,7 +198,7 @@ void trace_conf_input (trace_type_t *ttype, unsigned len, char *data)
static int postconf_initialized;
static int leaseconf_initialized;
isc_result_t status;
-
+
/* Do what's done above, except that we don't have to read in the
data, because it's already been read for us. */
tflen = strlen (data);
@@ -389,7 +389,7 @@ int parse_statement (cfile, group, type, host_decl, declaration)
parse_semi (cfile);
}
return 1;
-
+
case HOST:
skip_token(&val, (unsigned *)0, cfile);
if (type != HOST_DECL && type != CLASS_DECL) {
@@ -612,7 +612,7 @@ int parse_statement (cfile, group, type, host_decl, declaration)
} else if (type != SUBNET_DECL && type != SHARED_NET_DECL) {
parse_warn (cfile, "pool declared outside of network");
skip_to_semi(cfile);
- } else
+ } else
parse_pool_statement (cfile, group, type);
return declaration;
@@ -672,7 +672,7 @@ int parse_statement (cfile, group, type, host_decl, declaration)
} else if (type != SUBNET_DECL) {
parse_warn (cfile, "pool6 declared outside of network");
skip_to_semi(cfile);
- } else
+ } else
parse_pool6_statement (cfile, group, type);
return declaration;
@@ -697,7 +697,7 @@ int parse_statement (cfile, group, type, host_decl, declaration)
group -> authoritative = 1;
authoritative:
if (type == HOST_DECL)
- parse_warn (cfile, "authority makes no sense here.");
+ parse_warn (cfile, "authority makes no sense here.");
parse_semi (cfile);
break;
@@ -803,8 +803,8 @@ int parse_statement (cfile, group, type, host_decl, declaration)
skip_to_semi (cfile);
#endif
break;
-
-#ifdef DHCPv6
+
+#ifdef DHCPv6
case SERVER_DUID:
parse_server_duid_conf(cfile);
break;
@@ -1116,7 +1116,7 @@ void parse_failover_peer (cfile, group, type)
goto make_hba;
}
break;
-
+
case LOAD:
token = next_token (&val, (unsigned *)0, cfile);
if (token != BALANCE) {
@@ -1142,7 +1142,7 @@ void parse_failover_peer (cfile, group, type)
}
peer -> load_balance_max_secs = atoi (val);
break;
-
+
default:
parse_warn (cfile,
"invalid statement in peer declaration");
@@ -1300,11 +1300,11 @@ void parse_failover_state_declaration (struct parse *cfile,
state -> mclt = atoi (val);
parse_semi (cfile);
break;
-
+
default:
parse_warn (cfile, "expecting state setting.");
bogus:
- skip_to_rbrace (cfile, 1);
+ skip_to_rbrace (cfile, 1);
dhcp_failover_state_dereference (&state, MDL);
return;
}
@@ -1355,23 +1355,23 @@ void parse_failover_state (cfile, state, stos)
case RECOVER:
state_in = recover;
break;
-
+
case RECOVER_WAIT:
state_in = recover_wait;
break;
-
+
case RECOVER_DONE:
state_in = recover_done;
break;
-
+
case SHUTDOWN:
state_in = shut_down;
break;
-
+
case PAUSED:
state_in = paused;
break;
-
+
case STARTUP:
state_in = startup;
break;
@@ -1391,7 +1391,7 @@ void parse_failover_state (cfile, state, stos)
skip_to_semi (cfile);
return;
}
-
+
stos_in = parse_date (cfile);
if (!stos_in)
return;
@@ -1405,7 +1405,7 @@ void parse_failover_state (cfile, state, stos)
}
#endif /* defined (FAILOVER_PROTOCOL) */
-/*!
+/*!
* \brief Parses an authoring-byte-order statement
*
* A valid statement looks like this:
@@ -1516,14 +1516,14 @@ void parse_lease_id_format (struct parse *cfile)
}
/*!
- *
+ *
* \brief Parse allow and deny statements
*
* This function handles the common processing code for permit and deny
* statements in the parse_pool_statement and parse_pool6_statement functions.
* It reads in the configuration and constructs a new permit structure that it
* attachs to the permit_head passed in from the caller.
- *
+ *
* The allow or deny token should already be consumed, this function expects
* one of the following:
* known-clients;
@@ -1569,7 +1569,7 @@ void get_permit(cfile, permit_head, is_allow, valid_from, valid_until)
case UNKNOWN:
permit->type = permit_unknown_clients;
break;
-
+
case KNOWN_CLIENTS:
need_clients = 0;
permit->type = permit_known_clients;
@@ -1583,11 +1583,11 @@ void get_permit(cfile, permit_head, is_allow, valid_from, valid_until)
case KNOWN:
permit->type = permit_known_clients;
break;
-
+
case AUTHENTICATED:
permit->type = permit_authenticated_clients;
break;
-
+
case UNAUTHENTICATED:
permit->type = permit_unauthenticated_clients;
break;
@@ -1595,7 +1595,7 @@ void get_permit(cfile, permit_head, is_allow, valid_from, valid_until)
case ALL:
permit->type = permit_all_clients;
break;
-
+
case DYNAMIC:
permit->type = permit_dynamic_bootp_clients;
if (next_token (&val, NULL, cfile) != TOKEN_BOOTP) {
@@ -1762,7 +1762,7 @@ void parse_pool_statement (cfile, group, type)
/* Inherit the failover peer from the shared network. */
if (pool->shared_network->failover_peer)
dhcp_failover_state_reference
- (&pool->failover_peer,
+ (&pool->failover_peer,
pool->shared_network->failover_peer, MDL);
#endif
@@ -1790,7 +1790,7 @@ void parse_pool_statement (cfile, group, type)
(&pool->failover_peer, MDL);
#endif
break;
-
+
#if defined (FAILOVER_PROTOCOL)
case FAILOVER:
skip_token(&val, NULL, cfile);
@@ -1837,7 +1837,7 @@ void parse_pool_statement (cfile, group, type)
get_permit(cfile, &pool->prohibit_list, 0,
&pool->valid_from, &pool->valid_until);
break;
-
+
case RBRACE:
skip_token(&val, NULL, cfile);
done = 1;
@@ -2110,7 +2110,7 @@ void parse_host_declaration (cfile, group)
skip_token(&val, NULL, cfile);
token = next_token(&val, NULL, cfile);
if (token == V6RELOPT) {
- token = next_token(&val, NULL, cfile);
+ token = next_token(&val, NULL, cfile);
if (token != NUMBER) {
parse_warn(cfile,
"host-identifier v6relopt "
@@ -2127,7 +2127,7 @@ void parse_host_declaration (cfile, group)
break;
}
} else if (token != OPTION) {
- parse_warn(cfile,
+ parse_warn(cfile,
"host-identifier must be an option"
" or v6relopt");
skip_to_rbrace(cfile, 1);
@@ -2141,7 +2141,7 @@ void parse_host_declaration (cfile, group)
}
if (!known) {
parse_warn(cfile, "unknown option %s.%s",
- option->universe->name,
+ option->universe->name,
option->name);
skip_to_rbrace(cfile, 1);
break;
@@ -2152,7 +2152,7 @@ void parse_host_declaration (cfile, group)
option_dereference(&option, MDL);
break;
}
-
+
if (!parse_semi(cfile)) {
skip_to_rbrace(cfile, 1);
expression_dereference(&expr, MDL);
@@ -2162,7 +2162,7 @@ void parse_host_declaration (cfile, group)
option_reference(&host->host_id_option, option, MDL);
option_dereference(&option, MDL);
- data_string_copy(&host->host_id,
+ data_string_copy(&host->host_id,
&expr->data.const_data, MDL);
expression_dereference(&expr, MDL);
continue;
@@ -2198,7 +2198,7 @@ void parse_host_declaration (cfile, group)
MDL);
}
}
-
+
if (dynamicp)
host -> flags |= HOST_DECL_DYNAMIC;
else
@@ -2303,7 +2303,7 @@ int parse_class_declaration (cp, cfile, group, type)
data.len + 1, MDL)) {
if (pc)
class_dereference (&pc, MDL);
-
+
return 0;
}
data.terminated = 1;
@@ -2561,7 +2561,7 @@ int parse_class_declaration (cp, cfile, group, type)
if (class->flags & CLASS_DECL_DELETED) {
if (type == CLASS_TYPE_CLASS) {
struct class *theclass = NULL;
-
+
status = find_class(&theclass, class->name, MDL);
if (status == ISC_R_SUCCESS) {
delete_class(theclass, 0);
@@ -2681,7 +2681,7 @@ void parse_shared_net_declaration (cfile, group)
static int
-common_subnet_parsing(struct parse *cfile,
+common_subnet_parsing(struct parse *cfile,
struct shared_network *share,
struct subnet *subnet) {
enum dhcp_token token;
@@ -2852,7 +2852,7 @@ parse_subnet6_declaration(struct parse *cfile, struct shared_network *share) {
const char *val;
char *endp;
int ofs;
- const static int mask[] = { 0x00, 0x80, 0xC0, 0xE0,
+ const static int mask[] = { 0x00, 0x80, 0xC0, 0xE0,
0xF0, 0xF8, 0xFC, 0xFE };
struct iaddr iaddr;
@@ -2919,8 +2919,8 @@ parse_subnet6_declaration(struct parse *cfile, struct shared_network *share) {
}
subnet->prefix_len = strtol(val, &endp, 10);
- if ((subnet->prefix_len < 0) ||
- (subnet->prefix_len > 128) ||
+ if ((subnet->prefix_len < 0) ||
+ (subnet->prefix_len > 128) ||
(*endp != '\0')) {
parse_warn(cfile, "Expecting a number between 0 and 128.");
subnet_dereference(&subnet, MDL);
@@ -2935,8 +2935,8 @@ parse_subnet6_declaration(struct parse *cfile, struct shared_network *share) {
return;
}
- /*
- * Create a netmask.
+ /*
+ * Create a netmask.
*/
subnet->netmask.len = 16;
ofs = subnet->prefix_len / 8;
@@ -2988,12 +2988,12 @@ void parse_group_declaration (cfile, group)
token = peek_token(&val, NULL, cfile);
if (is_identifier (token) || token == STRING) {
skip_token(&val, NULL, cfile);
-
+
name = dmalloc(strlen(val) + 1, MDL);
if (!name)
log_fatal("no memory for group decl name %s", val);
strcpy(name, val);
- }
+ }
if (!parse_lbrace(cfile)) {
group_dereference(&g, MDL);
@@ -3059,8 +3059,8 @@ void parse_group_declaration (cfile, group)
| ip-addrs-or-hostnames ip-addr-or-hostname */
int
-parse_fixed_addr_param(struct option_cache **oc,
- struct parse *cfile,
+parse_fixed_addr_param(struct option_cache **oc,
+ struct parse *cfile,
enum dhcp_token type) {
int parse_ok;
const char *val;
@@ -3197,17 +3197,17 @@ int parse_lease_declaration (struct lease **lp, struct parse *cfile)
seenbit = 1;
lease -> starts = t;
break;
-
+
case ENDS:
seenbit = 2;
lease -> ends = t;
break;
-
+
case TSTP:
seenbit = 65536;
lease -> tstp = t;
break;
-
+
case TSFP:
seenbit = 131072;
lease -> tsfp = t;
@@ -3217,12 +3217,12 @@ int parse_lease_declaration (struct lease **lp, struct parse *cfile)
seenbit = 262144;
lease->atsfp = t;
break;
-
+
case CLTT:
seenbit = 524288;
lease -> cltt = t;
break;
-
+
default: /* for gcc, we'll never get here. */
log_fatal ("Impossible error at %s:%d.", MDL);
return 0;
@@ -3442,7 +3442,7 @@ int parse_lease_declaration (struct lease **lp, struct parse *cfile)
}
}
break;
-
+
case BILLING:
seenbit = 2048;
class = (struct class *)0;
@@ -3540,7 +3540,7 @@ int parse_lease_declaration (struct lease **lp, struct parse *cfile)
case TOKEN_SET:
noequal = 0;
-
+
token = next_token (&val, (unsigned *)0, cfile);
if (token != NAME && token != NUMBER_OR_NAME) {
parse_warn (cfile,
@@ -3551,7 +3551,7 @@ int parse_lease_declaration (struct lease **lp, struct parse *cfile)
lease_dereference (&lease, MDL);
return 0;
}
-
+
seenbit = 0;
special_set:
if (lease -> scope)
@@ -3852,7 +3852,7 @@ void parse_address_range (cfile, group, type, inpool, lpchain)
then look for a pool with an empty prohibit list and
a permit list with one entry that permits all clients. */
for (pool = share -> pools; pool; pool = pool -> next) {
- if ((!dynamic && !pool -> permit_list &&
+ if ((!dynamic && !pool -> permit_list &&
pool -> prohibit_list &&
!pool -> prohibit_list -> next &&
(pool -> prohibit_list -> type ==
@@ -3980,7 +3980,7 @@ add_ipv6_pool_to_subnet(struct subnet *subnet, u_int16_t type,
pool->ipv6_pond = NULL;
ipv6_pond_reference(&pool->ipv6_pond, pond, MDL);
- /*
+ /*
* Increase our array size for ipv6_pools in the pond
*/
if (pond->ipv6_pools == NULL) {
@@ -3996,7 +3996,7 @@ add_ipv6_pool_to_subnet(struct subnet *subnet, u_int16_t type,
log_fatal("Out of memory");
}
if (num_pools > 0) {
- memcpy(tmp, pond->ipv6_pools,
+ memcpy(tmp, pond->ipv6_pools,
sizeof(struct ipv6_pool *) * num_pools);
}
if (pond->ipv6_pools != NULL) {
@@ -4004,7 +4004,7 @@ add_ipv6_pool_to_subnet(struct subnet *subnet, u_int16_t type,
}
pond->ipv6_pools = tmp;
- /*
+ /*
* Record this pool in our array of pools for this shared network.
*/
ipv6_pool_reference(&pond->ipv6_pools[num_pools], pool, MDL);
@@ -4055,11 +4055,11 @@ add_ipv6_pool_to_subnet(struct subnet *subnet, u_int16_t type,
* with a single entry that permits all clients. If the shared
* network doesn't have one of them create it and attach it to
* the shared network and the return argument.
- *
+ *
* This function is used when we have a range6 or prefix6 statement
* inside a subnet6 statement but outside of a pool6 statement.
* This routine constructs the missing ipv6_pond structure so
- * we always have
+ * we always have
* shared_network -> ipv6_pond -> ipv6_pool
*
* \param[in] group = a pointer to the group structure from which
@@ -4094,7 +4094,7 @@ add_ipv6_pond_to_network(struct group *group,
/* no pond available, make one */
status = ipv6_pond_allocate(&pond, MDL);
- if (status != ISC_R_SUCCESS)
+ if (status != ISC_R_SUCCESS)
log_fatal ("no memory for ad-hoc ipv6 pond: %s",
isc_result_totext (status));
p = new_permit (MDL);
@@ -4110,7 +4110,7 @@ add_ipv6_pond_to_network(struct group *group,
if (shared->ipv6_pond)
ipv6_pond_reference(&last->next, pond, MDL);
- else
+ else
ipv6_pond_reference(&shared->ipv6_pond, pond, MDL);
shared_network_reference(&pond->shared_network, shared, MDL);
@@ -4126,7 +4126,7 @@ add_ipv6_pond_to_network(struct group *group,
| ip-address6 SLASH number SEMI
| ip-address6 [SLASH number] TEMPORARY SEMI */
-void
+void
parse_address_range6(struct parse *cfile,
struct group *group,
struct ipv6_pond *inpond) {
@@ -4171,7 +4171,7 @@ parse_address_range6(struct parse *cfile,
memset(&net, 0, sizeof(net));
net.cidrnet.lo_addr = lo;
- /*
+ /*
* See if we we're using range or CIDR notation or TEMPORARY
*/
token = peek_token(&val, NULL, cfile);
@@ -4181,7 +4181,7 @@ parse_address_range6(struct parse *cfile,
*/
skip_token(NULL, NULL, cfile);
token = next_token(&val, NULL, cfile);
- if (token != NUMBER) {
+ if (token != NUMBER) {
parse_warn(cfile, "expecting number");
skip_to_semi(cfile);
return;
@@ -4237,7 +4237,7 @@ parse_address_range6(struct parse *cfile,
} else {
/*
- * No '/', so we are looking for the end address of
+ * No '/', so we are looking for the end address of
* the IPv6 pool.
*/
if (!parse_ip6_addr(cfile, &hi)) {
@@ -4278,12 +4278,12 @@ parse_address_range6(struct parse *cfile,
/* Now that we have a pond add the nets we have parsed */
for (p=nets; p != NULL; p=p->next) {
add_ipv6_pool_to_subnet(group->subnet, type,
- &p->cidrnet.lo_addr,
+ &p->cidrnet.lo_addr,
p->cidrnet.bits, 128, pond);
}
/* if we allocated a list free it now */
- if (nets != &net)
+ if (nets != &net)
free_iaddrcidrnetlist(&nets);
ipv6_pond_dereference(&pond, MDL);
@@ -4298,7 +4298,7 @@ parse_address_range6(struct parse *cfile,
/* prefix6-declaration :== ip-address6 ip-address6 SLASH number SEMI */
-void
+void
parse_prefix6(struct parse *cfile,
struct group *group,
struct ipv6_pond *inpond) {
@@ -4432,7 +4432,7 @@ parse_prefix6(struct parse *cfile,
} else {
add_ipv6_pond_to_network(group, &pond);
}
-
+
for (p = nets; p != NULL; p = p->next) {
/* Normalize and check. */
if (p->cidrnet.bits == 128) {
@@ -4612,7 +4612,7 @@ void parse_pool6_statement (cfile, group, type)
get_permit(cfile, &pond->prohibit_list, 0,
&pond->valid_from, &pond->valid_until);
break;
-
+
case RBRACE:
skip_token(&val, NULL, cfile);
done = 1;
@@ -4641,7 +4641,7 @@ void parse_pool6_statement (cfile, group, type)
* to repoint the leases to the other pond which is annoying. SAR
*/
- /*
+ /*
* Add this pond to the list (will need updating if we add the
* optimization).
*/
@@ -4891,7 +4891,7 @@ parse_ia_na_declaration(struct parse *cfile) {
prefer = atoi (val);
/*
- * Currently we peek for the semi-colon to
+ * Currently we peek for the semi-colon to
* allow processing of older lease files that
* don't have the semi-colon. Eventually we
* should remove the peeking code.
@@ -4919,7 +4919,7 @@ parse_ia_na_declaration(struct parse *cfile) {
valid = atoi (val);
/*
- * Currently we peek for the semi-colon to
+ * Currently we peek for the semi-colon to
* allow processing of older lease files that
* don't have the semi-colon. Eventually we
* should remove the peeking code.
@@ -5054,7 +5054,7 @@ parse_ia_na_declaration(struct parse *cfile) {
}
break;
-
+
default:
parse_warn(cfile, "corrupt lease file; "
"expecting ia_na contents, "
@@ -5115,7 +5115,7 @@ parse_ia_na_declaration(struct parse *cfile) {
}
executable_statement_dereference (&on_star[i], MDL);
}
-
+
/* find the pool this address is in */
pool = NULL;
if (find_ipv6_pool(&pool, D6O_IA_NA,
@@ -5170,7 +5170,7 @@ parse_ia_na_declaration(struct parse *cfile) {
if (ia_hash_lookup(&old_ia, ia_na_active,
(unsigned char *)ia->iaid_duid.data,
ia->iaid_duid.len, MDL)) {
- ia_hash_delete(ia_na_active,
+ ia_hash_delete(ia_na_active,
(unsigned char *)ia->iaid_duid.data,
ia->iaid_duid.len, MDL);
ia_dereference(&old_ia, MDL);
@@ -5180,7 +5180,7 @@ parse_ia_na_declaration(struct parse *cfile) {
* If we have addresses, add this, otherwise don't bother.
*/
if (ia->num_iasubopt > 0) {
- ia_hash_add(ia_na_active,
+ ia_hash_add(ia_na_active,
(unsigned char *)ia->iaid_duid.data,
ia->iaid_duid.len, ia, MDL);
}
@@ -5339,7 +5339,7 @@ parse_ia_ta_declaration(struct parse *cfile) {
prefer = atoi (val);
/*
- * Currently we peek for the semi-colon to
+ * Currently we peek for the semi-colon to
* allow processing of older lease files that
* don't have the semi-colon. Eventually we
* should remove the peeking code.
@@ -5367,7 +5367,7 @@ parse_ia_ta_declaration(struct parse *cfile) {
valid = atoi (val);
/*
- * Currently we peek for the semi-colon to
+ * Currently we peek for the semi-colon to
* allow processing of older lease files that
* don't have the semi-colon. Eventually we
* should remove the peeking code.
@@ -5500,9 +5500,9 @@ parse_ia_ta_declaration(struct parse *cfile) {
return;
}
}
-
+
break;
-
+
default:
parse_warn(cfile, "corrupt lease file; "
"expecting ia_ta contents, "
@@ -5563,7 +5563,7 @@ parse_ia_ta_declaration(struct parse *cfile) {
}
executable_statement_dereference (&on_star[i], MDL);
}
-
+
/* find the pool this address is in */
pool = NULL;
if (find_ipv6_pool(&pool, D6O_IA_TA,
@@ -5607,7 +5607,7 @@ parse_ia_ta_declaration(struct parse *cfile) {
if (ia_hash_lookup(&old_ia, ia_ta_active,
(unsigned char *)ia->iaid_duid.data,
ia->iaid_duid.len, MDL)) {
- ia_hash_delete(ia_ta_active,
+ ia_hash_delete(ia_ta_active,
(unsigned char *)ia->iaid_duid.data,
ia->iaid_duid.len, MDL);
ia_dereference(&old_ia, MDL);
@@ -5617,7 +5617,7 @@ parse_ia_ta_declaration(struct parse *cfile) {
* If we have addresses, add this, otherwise don't bother.
*/
if (ia->num_iasubopt > 0) {
- ia_hash_add(ia_ta_active,
+ ia_hash_add(ia_ta_active,
(unsigned char *)ia->iaid_duid.data,
ia->iaid_duid.len, ia, MDL);
}
@@ -5777,7 +5777,7 @@ parse_ia_pd_declaration(struct parse *cfile) {
prefer = atoi (val);
/*
- * Currently we peek for the semi-colon to
+ * Currently we peek for the semi-colon to
* allow processing of older lease files that
* don't have the semi-colon. Eventually we
* should remove the peeking code.
@@ -5805,7 +5805,7 @@ parse_ia_pd_declaration(struct parse *cfile) {
valid = atoi (val);
/*
- * Currently we peek for the semi-colon to
+ * Currently we peek for the semi-colon to
* allow processing of older lease files that
* don't have the semi-colon. Eventually we
* should remove the peeking code.
@@ -5940,7 +5940,7 @@ parse_ia_pd_declaration(struct parse *cfile) {
}
break;
-
+
default:
parse_warn(cfile, "corrupt lease file; "
"expecting ia_pd contents, "
@@ -6001,7 +6001,7 @@ parse_ia_pd_declaration(struct parse *cfile) {
}
executable_statement_dereference (&on_star[i], MDL);
}
-
+
/* Find the pool this address is in. We need to check prefix
* lengths too in case the pool has been reconfigured. */
pool = NULL;
@@ -6057,7 +6057,7 @@ parse_ia_pd_declaration(struct parse *cfile) {
* If we have prefixes, add this, otherwise don't bother.
*/
if (ia->num_iasubopt > 0) {
- ia_hash_add(ia_pd_active,
+ ia_hash_add(ia_pd_active,
(unsigned char *)ia->iaid_duid.data,
ia->iaid_duid.len, ia, MDL);
}
@@ -6065,9 +6065,9 @@ parse_ia_pd_declaration(struct parse *cfile) {
#endif /* defined(DHCPv6) */
}
-#ifdef DHCPv6
+#ifdef DHCPv6
/*
- * When we parse a server-duid statement in a lease file, we are
+ * When we parse a server-duid statement in a lease file, we are
* looking at the saved server DUID from a previous run. In this case
* we expect it to be followed by the binary representation of the
* DUID stored in a string:
@@ -6078,7 +6078,7 @@ parse_ia_pd_declaration(struct parse *cfile) {
*
* server-duid 00:01:00:01:1e:68:b3:db:0a:00:27:00:00:02;
*/
-void
+void
parse_server_duid(struct parse *cfile) {
struct data_string duid;
unsigned char bytes[128]; /* Maximum valid DUID is 128 */
@@ -6117,7 +6117,7 @@ parse_server_duid(struct parse *cfile) {
* server-duid ll ethernet|ieee802|fddi 00:16:6F:49:7D:9B;
* server-duid en 2495 "enterprise-specific-identifier-1234";
*/
-void
+void
parse_server_duid_conf(struct parse *cfile) {
enum dhcp_token token;
const char *val;
@@ -6139,7 +6139,7 @@ parse_server_duid_conf(struct parse *cfile) {
*/
token = next_token(&val, NULL, cfile);
- /*
+ /*
* Enterprise is the easiest - enterprise number and raw data
* are required.
*/
@@ -6179,7 +6179,7 @@ parse_server_duid_conf(struct parse *cfile) {
data_string_forget(&duid, MDL);
}
- /*
+ /*
* Next easiest is the link-layer DUID. It consists only of
* the LL directive, or optionally the specific value to use.
*
@@ -6208,7 +6208,7 @@ parse_server_duid_conf(struct parse *cfile) {
parse_warn(cfile, "hardware type expected");
skip_to_semi(cfile);
return;
- }
+ }
memset(&ll_addr, 0, sizeof(ll_addr));
if (!parse_cshl(&ll_addr, cfile)) {
return;
@@ -6225,7 +6225,7 @@ parse_server_duid_conf(struct parse *cfile) {
duid.data = (unsigned char *)duid.buffer->data;
putUShort(duid.buffer->data, DUID_LL);
putUShort(duid.buffer->data + 2, ll_type);
- memcpy(duid.buffer->data + 4,
+ memcpy(duid.buffer->data + 4,
ll_addr.data, ll_addr.len);
set_server_duid(&duid);
@@ -6234,7 +6234,7 @@ parse_server_duid_conf(struct parse *cfile) {
}
}
- /*
+ /*
* Finally the link-layer DUID plus time. It consists only of
* the LLT directive, or optionally the specific value to use.
*
@@ -6263,8 +6263,8 @@ parse_server_duid_conf(struct parse *cfile) {
parse_warn(cfile, "hardware type expected");
skip_to_semi(cfile);
return;
- }
-
+ }
+
token = next_token(&val, NULL, cfile);
if (token != NUMBER) {
parse_warn(cfile, "timestamp expected");
@@ -6290,7 +6290,7 @@ parse_server_duid_conf(struct parse *cfile) {
putUShort(duid.buffer->data, DUID_LLT);
putUShort(duid.buffer->data + 2, ll_type);
putULong(duid.buffer->data + 4, llt_time);
- memcpy(duid.buffer->data + 8,
+ memcpy(duid.buffer->data + 8,
ll_addr.data, ll_addr.len);
set_server_duid(&duid);
@@ -6306,7 +6306,7 @@ parse_server_duid_conf(struct parse *cfile) {
*
* In this case, they have to put in the complete value.
*
- * This also works for existing DUID types of course.
+ * This also works for existing DUID types of course.
*/
else if (token == NUMBER) {
duid_type_num = atoi(val);
@@ -6353,7 +6353,7 @@ parse_server_duid_conf(struct parse *cfile) {
}
}
-/*!
+/*!
* \brief Creates a byte-order corrected uint32 from a buffer
*
* This function creates an integer value from a buffer, converting from
@@ -6437,4 +6437,3 @@ parse_iaid_duid(struct parse* cfile, struct ia_xx** ia, u_int32_t *iaid,
}
#endif /* DHCPv6 */
-