mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-23 02:17:31 +00:00
Clarify error message when lease limit reached. [rt17010]
This commit is contained in:
parent
b1d3778ce8
commit
65cf86d7ab
2
RELNOTES
2
RELNOTES
@ -55,6 +55,8 @@ suggested fixes to <dhcp-users@isc.org>.
|
|||||||
|
|
||||||
Changes since 4.0.0b2
|
Changes since 4.0.0b2
|
||||||
|
|
||||||
|
- Clarified error message when lease limit exceeded
|
||||||
|
|
||||||
- The server will now include multiple IA_NA's and multiple IAADDRs within
|
- The server will now include multiple IA_NA's and multiple IAADDRs within
|
||||||
them, if advertised by the client. It still only seeks to allocate one
|
them, if advertised by the client. It still only seeks to allocate one
|
||||||
new address.
|
new address.
|
||||||
|
@ -1825,28 +1825,25 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp)
|
|||||||
|
|
||||||
/* If we don't have an active billing, see if we need
|
/* If we don't have an active billing, see if we need
|
||||||
one, and if we do, try to do so. */
|
one, and if we do, try to do so. */
|
||||||
if (!lease -> billing_class) {
|
if (lease->billing_class == NULL) {
|
||||||
|
int bill = 0;
|
||||||
for (i = 0; i < packet->class_count; i++) {
|
for (i = 0; i < packet->class_count; i++) {
|
||||||
if (packet -> classes [i] -> lease_limit)
|
if (packet->classes[i]->lease_limit) {
|
||||||
break;
|
bill++;
|
||||||
}
|
if (bill_class(lease,
|
||||||
if (i != packet -> class_count) {
|
|
||||||
for (i = 0; i < packet -> class_count; i++)
|
|
||||||
if ((packet ->
|
|
||||||
classes [i] -> lease_limit) &&
|
|
||||||
bill_class (lease,
|
|
||||||
packet->classes[i]))
|
packet->classes[i]))
|
||||||
break;
|
break;
|
||||||
if (i == packet -> class_count) {
|
}
|
||||||
log_info ("%s: no available billing",
|
}
|
||||||
msg);
|
if (bill != 0 && i == packet->class_count) {
|
||||||
|
log_info("%s: no available billing: lease "
|
||||||
|
"limit reached in all matching "
|
||||||
|
"classes", msg);
|
||||||
free_lease_state(state, MDL);
|
free_lease_state(state, MDL);
|
||||||
if (host)
|
if (host)
|
||||||
host_dereference(&host, MDL);
|
host_dereference(&host, MDL);
|
||||||
/* XXX possibly not necessary: */
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* If this is an offer, undo the billing. We go
|
/* If this is an offer, undo the billing. We go
|
||||||
* through all the steps above to bill a class so
|
* through all the steps above to bill a class so
|
||||||
|
Loading…
x
Reference in New Issue
Block a user