summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorTomek Mrugalski <tomek@isc.org>2022-01-19 20:14:16 +0100
committerTomek Mrugalski <tomek@isc.org>2022-01-20 12:04:28 +0100
commitf6b8f48d1665c4487dedbcfa4dca435a0d67ddeb (patch)
tree19926f31f56890bc8c7f5d3bc5b2e2c16b96794e /server
parent429a56d73c0f9f2edf400fd6313850a3ce4fd809 (diff)
downloadisc-dhcp-f6b8f48d1665c4487dedbcfa4dca435a0d67ddeb.tar.gz
[#189] Whitespace fixes in opened files
Diffstat (limited to 'server')
-rw-r--r--server/bootp.c4
-rw-r--r--server/confpars.c207
-rw-r--r--server/dhcpd.820
-rw-r--r--server/failover.c2
-rw-r--r--server/ldap_casa.c43
-rw-r--r--server/leasechain.c34
-rw-r--r--server/omapi.c4
-rw-r--r--server/stables.c2
-rw-r--r--server/tests/hash_unittest.c2
9 files changed, 158 insertions, 160 deletions
diff --git a/server/bootp.c b/server/bootp.c
index cf7b75cd..d81f4f36 100644
--- a/server/bootp.c
+++ b/server/bootp.c
@@ -174,7 +174,7 @@ void bootp (packet)
&lease->scope, hp->group,
lease->subnet->group, NULL);
}
-
+
/* Drop the request if it's not allowed for this client. */
if ((oc = lookup_option (&server_universe, options, SV_ALLOW_BOOTP)) &&
!evaluate_boolean_option_cache(&ignorep, packet, lease,
@@ -184,7 +184,7 @@ void bootp (packet)
if (!ignorep)
log_info ("%s: bootp disallowed", msgbuf);
goto out;
- }
+ }
if ((oc = lookup_option(&server_universe,
options, SV_ALLOW_BOOTING)) &&
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 */
-
diff --git a/server/dhcpd.8 b/server/dhcpd.8
index a5f4445f..bff88ab2 100644
--- a/server/dhcpd.8
+++ b/server/dhcpd.8
@@ -54,7 +54,7 @@ dhcpd - Dynamic Host Configuration Protocol Server
]
[
.B -4
-|
+|
.B -6
]
[
@@ -127,7 +127,7 @@ enters them into the dhcpd.conf(5) file.
There are two versions of the DHCP protocol DHCPv4 and DHCPv6. At
startup the server may be started for one or the other via the
.B -4
-or
+or
.B -6
arguments.
.PP
@@ -220,7 +220,7 @@ to ::1 \fIport\fR and \fIport + 1\fR. Both servers must
be launched using the same \fIport\fR argument.
.TP
.BI \-p \ port
-The UDP port number on which
+The UDP port number on which
.B dhcpd
should listen. If unspecified
.B dhcpd
@@ -228,7 +228,7 @@ uses the default port of 67. This is mostly useful for debugging
purposes.
.TP
.BI \-s \ address
-Specify an address or host name to which
+Specify an address or host name to which
.B dhcpd
should send replies rather than the broadcast address (255.255.255.255).
This option is only supported in IPv4.
@@ -237,8 +237,8 @@ This option is only supported in IPv4.
Force
.B dhcpd
to run as a foreground process instead of as a daemon in the background.
-This is useful when running
-.B dhcpd
+This is useful when running
+.B dhcpd
under a debugger, or when running it
out of inittab on System V systems.
.TP
@@ -246,14 +246,14 @@ out of inittab on System V systems.
Send log messages to the standard error descriptor.
This can be useful for debugging, and also at sites where a
complete log of all dhcp activity must be kept but syslogd is not
-reliable or otherwise cannot be used. Normally,
+reliable or otherwise cannot be used. Normally,
.B dhcpd
will log all
output using the \fBsyslog(3)\fR function with the log facility set to
LOG_DAEMON. Note that \fB\-d\fR implies \fB\-f\fR (the daemon will
not fork itself into the background).
.TP
-.BI \-q
+.BI \-q
Be quiet at startup. This suppresses the printing of the entire
copyright message during startup. This might be desirable when
starting
@@ -319,7 +319,7 @@ lease file.
Print version number and exit.
.PP
.I Modifying default file locations:
-The following options can be used to modify the locations
+The following options can be used to modify the locations
.B dhcpd
uses for its files. Because of the importance of using the same
lease database at all times when running dhcpd in production, these
@@ -690,7 +690,7 @@ dhcpd.conf file.
.PP
Named groups currently can only be associated with
hosts - this allows one set of statements to be efficiently attached
-to more than one host declaration.
+to more than one host declaration.
.PP
Groups have the following attributes:
.PP
diff --git a/server/failover.c b/server/failover.c
index bbe1ff4c..320ce1bc 100644
--- a/server/failover.c
+++ b/server/failover.c
@@ -6577,7 +6577,7 @@ void scrub_lease(struct lease* lease, const char *file, int line) {
* draws more questions then it helps, so we'll ifdef it out */
log_debug ("%s(%d):scrubbing lease for %s, hostname: %s", file, line,
piaddr(lease->ip_addr), printable(lease->client_hostname));
-#endif
+#endif
if (lease->client_hostname) {
dfree (lease->client_hostname, MDL);
diff --git a/server/ldap_casa.c b/server/ldap_casa.c
index 9329450f..4e302e37 100644
--- a/server/ldap_casa.c
+++ b/server/ldap_casa.c
@@ -1,31 +1,31 @@
/* ldap_casa.c
-
+
CASA routines for DHCPD... */
/* Copyright (c) 2006 Novell, Inc.
* All rights reserved.
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * 1.Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2.Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * 3.Neither the name of ISC, ISC DHCP, nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
-
- * THIS SOFTWARE IS PROVIDED BY INTERNET SYSTEMS CONSORTIUM AND CONTRIBUTORS
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * 1.Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2.Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * 3.Neither the name of ISC, ISC DHCP, nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+ * THIS SOFTWARE IS PROVIDED BY INTERNET SYSTEMS CONSORTIUM AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ISC OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ISC OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* This file was written by S Kalyanasundaram <skalyanasundaram@novell.com>
@@ -158,4 +158,3 @@ load_uname_pwd_from_miCASA (char **ldap_username, char **ldap_password)
}
#endif /* LDAP_CASA_AUTH */
-
diff --git a/server/leasechain.c b/server/leasechain.c
index 12f88597..7ccc30be 100644
--- a/server/leasechain.c
+++ b/server/leasechain.c
@@ -30,7 +30,7 @@
* \page leasechain structures overview
*
* A brief description of the leasechain structures
- *
+ *
* This file provides additional data structures for a leasecain to
* provide faster access to leases on the queues associated with a pool
* than a linear walk. Each pool has a set of queues: active, free, backup,
@@ -55,11 +55,11 @@
* | next |->| next |->NULL
* NULL<- | prev |<-| prev |
* +-------+ +-------+
- *
+ *
* The linked list is maintained in an ordered state. Inserting an entry is
* accomplished by doing a binary search on the array to find the proper place
* in the list and then updating the pointers in the linked list to include the
- * new entry. The entry is added into the array by copying the remainder of
+ * new entry. The entry is added into the array by copying the remainder of
* the array to provide space for the new entry.
* Removing an entry is the reverse.
* The arrays for the queues will be pre-allocated but not all of them will be
@@ -142,7 +142,7 @@ lc_get_next(struct leasechain *lc, struct lease *lp) {
* Given a potential range of the array to insert the lease into this routine
* will recursively examine the range to find the proper place in which to
* insert the lease.
- *
+ *
* \param lc The leasechain to add the lease to
* \param lp The lease to insert
* \param min The minium index of the potential range for insertion
@@ -150,7 +150,7 @@ lc_get_next(struct leasechain *lc, struct lease *lp) {
*
* \return The index of the array entry to insert the lease
*/
-size_t
+size_t
lc_binary_search_insert_point(struct leasechain *lc,
struct lease *lp,
size_t min, size_t max)
@@ -168,7 +168,7 @@ lc_binary_search_insert_point(struct leasechain *lc,
return (lc_binary_search_insert_point(lc, lp,
min, mid_index - 1));
} else if ((lc->list[mid_index]->sort_time < lp->sort_time) ||
- ((lc->list[mid_index]->sort_time == lp->sort_time) &&
+ ((lc->list[mid_index]->sort_time == lp->sort_time) &&
(lc->list[mid_index]->sort_tiebreaker < lp->sort_tiebreaker))) {
if (mid_index == max) {
/* insert in mid_index + 1 as sort_time is smaller */
@@ -189,7 +189,7 @@ lc_binary_search_insert_point(struct leasechain *lc,
*
* Given a potential range of the array to search this routine
* will recursively examine the range to find the proper lease
- *
+ *
* \param lc The leasechain to check
* \param lp The lease to find
* \param min The minium index of the search range
@@ -220,13 +220,13 @@ lc_binary_search_lease(struct leasechain *lc,
if (mid_index == min) {
/* lease not found */
return (SIZE_MAX);
- }
+ }
/* try the lower half of the list */
return (lc_binary_search_lease(lc, lp, min, mid_index - 1));
} else if ((lc->list[mid_index]->sort_time < lp->sort_time) ||
((lc->list[mid_index]->sort_time == lp->sort_time) &&
(lc->list[mid_index]->sort_tiebreaker < lp->sort_tiebreaker))) {
- /* try the upper half of the list */
+ /* try the upper half of the list */
return (lc_binary_search_lease(lc, lp, mid_index + 1, max));
}
@@ -253,7 +253,7 @@ lc_binary_search_lease(struct leasechain *lc,
/* Are we done with this range? */
if ((i == min) ||
- ((lc->list[i]->sort_time != lp->sort_time) ||
+ ((lc->list[i]->sort_time != lp->sort_time) ||
((lc->list[i]->sort_time == lp->sort_time) &&
(lc->list[i]->sort_tiebreaker != lp->sort_tiebreaker)))) {
break;
@@ -263,7 +263,7 @@ lc_binary_search_lease(struct leasechain *lc,
/* Check out entries above the mid_index */
if (mid_index < max) {
- /* We will break out of the loop if we either go past the
+ /* We will break out of the loop if we either go past the
* canddiates or hit the end of the range when i == max.
*/
for (i = mid_index + 1; i <= max; i++) {
@@ -304,7 +304,7 @@ lc_grow_chain(struct leasechain *lc) {
void *p;
size_t temp_size;
- if (lc->growth == 0)
+ if (lc->growth == 0)
temp_size = lc->total + LC_GROWTH_DELTA;
else
temp_size = lc->total + lc->growth;
@@ -366,7 +366,7 @@ lc_link_lcp(struct leasechain *lc, struct lease *lp, size_t n) {
sizeof(struct lease *) * (lc->nelem-n));
}
- /* clean any stale pointer info from this position before calling
+ /* clean any stale pointer info from this position before calling
* lease_reference as it won't work if pointer is not NULL
*/
lc->list[n] = NULL;
@@ -380,7 +380,7 @@ lc_link_lcp(struct leasechain *lc, struct lease *lp, size_t n) {
}
/*!
- *
+ *
* \brief Insert the lease at the specified position in both the lease chain
* and the linked list
*
@@ -452,7 +452,7 @@ lc_check_lc_sort_order(struct leasechain *lc) {
log_debug("LC check sort %s:%d", MDL);
for (i = 0; i < lc->nelem; i++ ) {
if ((lc->list[i]->sort_time < t) ||
- ((lc->list[i]->sort_time == t) &&
+ ((lc->list[i]->sort_time == t) &&
(lc->list[i]->tiebreaker < tiebreaker))) {
if (i > 0) {
print_lease(lc->list[i-1]);
@@ -476,7 +476,7 @@ lc_check_lc_sort_order(struct leasechain *lc) {
* The sort_time is set by the caller while the sort_tiebreaker is set here
* The value doesn't much matter as long as it prvoides a way to have different
* values in most of the leases.
- *
+ *
* When choosing a value for tiebreak we choose:
* 0 for the first lease in the queue
* 0 if the lease is going to the end of the queue with a sort_time greater
@@ -488,7 +488,7 @@ lc_check_lc_sort_order(struct leasechain *lc) {
* During startup when we can take advantage of the fact that leases may already
* be sorted and so check the end of the list to see if we can simply add the
* lease to the end.
- *
+ *
* \param lc The leasechain in which to insert the lease
* \param lp The lease to insert
*
diff --git a/server/omapi.c b/server/omapi.c
index 50804e26..2a70f7a4 100644
--- a/server/omapi.c
+++ b/server/omapi.c
@@ -1301,7 +1301,7 @@ isc_result_t dhcp_host_stuff_values (omapi_object_t *c,
status = omapi_connection_copyin (c,
ip_addrs.data, ip_addrs.len);
- if (status != ISC_R_SUCCESS) {
+ if (status != ISC_R_SUCCESS) {
data_string_forget (&ip_addrs, MDL);
return status;
}
@@ -1744,7 +1744,7 @@ isc_result_t dhcp_pool_stuff_values (omapi_object_t *c,
if (status != ISC_R_SUCCESS)
return (status);
- status = omapi_connection_put_named_uint32(c, "backup-leases",
+ status = omapi_connection_put_named_uint32(c, "backup-leases",
((u_int32_t)
pool->backup_leases));
if (status != ISC_R_SUCCESS)
diff --git a/server/stables.c b/server/stables.c
index 5242a656..c33809b0 100644
--- a/server/stables.c
+++ b/server/stables.c
@@ -66,7 +66,7 @@ struct failover_option_info ft_options [] =
FM_OFFSET(ip_flags), FTB_IP_FLAGS },
{ FTO_LEASE_EXPIRY, "lease-expiration-time", FT_UINT32, 1,
FM_OFFSET(expiry), FTB_LEASE_EXPIRY },
- { FTO_MAX_UNACKED, "max-unacked-bndupd", FT_UINT32, 1,
+ { FTO_MAX_UNACKED, "max-unacked-bndupd", FT_UINT32, 1,
FM_OFFSET(max_unacked), FTB_MAX_UNACKED },
{ FTO_MCLT, "MCLT", FT_UINT32, 1, FM_OFFSET(mclt), FTB_MCLT },
{ FTO_MESSAGE, "message", FT_TEXT, 0,
diff --git a/server/tests/hash_unittest.c b/server/tests/hash_unittest.c
index 757ef2af..3345cd8d 100644
--- a/server/tests/hash_unittest.c
+++ b/server/tests/hash_unittest.c
@@ -536,7 +536,7 @@ ATF_TC_BODY(lease_hash_basic_3hosts, tc) {
the code from using an improper client id earlier and restoring
the hash code to its previous state. As we may choose to
redo the hash code again this test hasn't been deleted.
-*/
+*/
/* this test is a direct reproduction of 29851 issue */
ATF_TC(uid_hash_rt29851);