work on other platforms. Please report any problems and suggested fixes to
<dhcp-users@isc.org>.
- Changes since 4.2.x
-<list of changes for 4.3 not in any 4.2.x - remove this line when done>
+ Changes since 4.2.0 (new features)
- If a client renews before 'dhcp-cache-threshold' percent of its lease
has elapsed (default 25%), the server will reuse the allocated lease
to perform an fsync() operation on the lease database before reply,
which improves performance. [ISC-Bugs #22228]
+- The 'no available billing' log line now also logs the name of the last
+ matching billing class tried before failing to provide a billing.
+ [ISC-Bugs #21759]
+
Changes since 4.2.4
- Correct code to calculate timing values in client to compare
/* If we don't have an active billing, see if we need
one, and if we do, try to do so. */
if (lease->billing_class == NULL) {
+ char *cname = "";
int bill = 0;
+
for (i = 0; i < packet->class_count; i++) {
- if (packet->classes[i]->lease_limit) {
+ struct class *billclass, *subclass;
+
+ billclass = packet->classes[i];
+ if (billclass->lease_limit) {
bill++;
- if (bill_class(lease,
- packet->classes[i]))
+ if (bill_class(lease, billclass))
break;
+
+ subclass = billclass->superclass;
+ if (subclass == NULL)
+ cname = subclass->name;
+ else
+ cname = billclass->name;
}
}
if (bill != 0 && i == packet->class_count) {
log_info("%s: no available billing: lease "
"limit reached in all matching "
- "classes", msg);
+ "classes (last: '%s')", msg, cname);
free_lease_state(state, MDL);
if (host)
host_dereference(&host, MDL);
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
* we can hit the 'no available billing' mark and
* abort without offering. But it just doesn't make