mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-31 14:25:41 +00:00
- A bug in subnet6 parsing where options contained in subnet6 clauses would
not be applied to clients addressed within that network was repaired. - When configuring a "subnet {}" or "subnet6 {}" without an explicit shared-network enclosing it, the DHCP software would synthesize a shared-network to contain the subnet. However, all configuration parameters within the subnet more intuitively belong "to any client on that interface", or rather the synthesized shared-network. So, when a shared-network is synthesized, it is used to contain the configuration present inside the subnet {} clause. This means that the configuration will be valid for all clients on that network, not just those addressed out of the stated subnet. If you intended the opposite, the workaround is to explicitly configure an empty shared-network. - A bug was fixed where Information-Request processing was not sourcing configured option values. - A warning was added since the DHCPv6 processing software does not yet support class statements. [ISC-Bugs #17638b]
This commit is contained in:
@@ -1366,9 +1366,21 @@ lease_to_client(struct data_string *reply_ret,
|
||||
* Make no reply if we gave no resources and is not
|
||||
* for Information-Request.
|
||||
*/
|
||||
if ((reply.ia_count == 0) && (reply.pd_count == 0) &&
|
||||
(reply.packet->dhcpv6_msg_type != DHCPV6_INFORMATION_REQUEST))
|
||||
goto exit;
|
||||
if ((reply.ia_count == 0) && (reply.pd_count == 0)) {
|
||||
if (reply.packet->dhcpv6_msg_type !=
|
||||
DHCPV6_INFORMATION_REQUEST)
|
||||
goto exit;
|
||||
|
||||
/*
|
||||
* Because we only execute statements on a per-IA basis,
|
||||
* we need to execute statements in any non-IA reply to
|
||||
* source configuration.
|
||||
*/
|
||||
execute_statements_in_scope(NULL, reply.packet, NULL, NULL,
|
||||
reply.packet->options,
|
||||
reply.opt_state, &global_scope,
|
||||
reply.shared->group, root_group);
|
||||
}
|
||||
|
||||
/*
|
||||
* RFC3315 section 17.2.2 (Solicit):
|
||||
@@ -2087,7 +2099,7 @@ reply_process_addr(struct reply_state *reply, struct option_cache *addr) {
|
||||
log_fatal("Impossible condition at %s:%d.", MDL);
|
||||
|
||||
scope = &reply->lease->scope;
|
||||
group = reply->shared->group;
|
||||
group = reply->lease->ipv6_pool->subnet->group;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2518,7 +2530,7 @@ find_client_temporaries(struct reply_state *reply) {
|
||||
|
||||
status = reply_process_is_addressed(reply,
|
||||
&reply->lease->scope,
|
||||
reply->shared->group);
|
||||
reply->lease->ipv6_pool->subnet->group);
|
||||
if (status != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
}
|
||||
@@ -2588,11 +2600,6 @@ find_client_address(struct reply_state *reply) {
|
||||
struct group *group;
|
||||
int i;
|
||||
|
||||
if (reply->host != NULL)
|
||||
group = reply->host->group;
|
||||
else
|
||||
group = reply->shared->group;
|
||||
|
||||
if (reply->static_lease) {
|
||||
if (reply->host == NULL)
|
||||
return ISC_R_INVALIDARG;
|
||||
@@ -2602,6 +2609,7 @@ find_client_address(struct reply_state *reply) {
|
||||
|
||||
status = ISC_R_SUCCESS;
|
||||
scope = &global_scope;
|
||||
group = reply->host->group;
|
||||
goto send_addr;
|
||||
}
|
||||
|
||||
@@ -2640,8 +2648,12 @@ find_client_address(struct reply_state *reply) {
|
||||
if (reply->lease == NULL)
|
||||
log_fatal("Impossible condition at %s:%d.", MDL);
|
||||
|
||||
/* Draw binding scopes from the lease's binding scope, and config
|
||||
* from the lease's containing subnet and higher. Note that it may
|
||||
* be desirable to place the group attachment directly in the pool.
|
||||
*/
|
||||
scope = &reply->lease->scope;
|
||||
group = reply->shared->group;
|
||||
group = reply->lease->ipv6_pool->subnet->group;
|
||||
|
||||
send_addr.len = 16;
|
||||
memcpy(send_addr.iabuf, &reply->lease->addr, 16);
|
||||
|
Reference in New Issue
Block a user