2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-02 15:05:16 +00:00

[#3588] Modified no test required classes

This commit is contained in:
Francis Dupont
2024-10-08 16:10:13 +02:00
parent 8263915af3
commit dc8af16a6e
14 changed files with 256 additions and 38 deletions

View File

@@ -4866,15 +4866,19 @@ void Dhcpv4Srv::requiredClassify(Dhcpv4Exchange& ex) {
for (auto const& cclass : classes) {
const ClientClassDefPtr class_def = dict->findClass(cclass);
if (!class_def) {
LOG_DEBUG(dhcp4_logger, DBG_DHCP4_BASIC, DHCP4_CLASS_UNDEFINED)
LOG_DEBUG(dhcp4_logger, DBG_DHCP4_BASIC,
DHCP4_REQUIRED_CLASS_UNDEFINED)
.arg(cclass);
// Ignore it as it can't have an attached action
continue;
}
const ExpressionPtr& expr_ptr = class_def->getMatchExpr();
// Nothing to do without an expression to evaluate
// Add a class without an expression to evaluate
if (!expr_ptr) {
LOG_DEBUG(dhcp4_logger, DBG_DHCP4_BASIC, DHCP4_CLASS_UNTESTABLE)
LOG_DEBUG(dhcp4_logger, DBG_DHCP4_BASIC,
DHCP4_REQUIRED_CLASS_UNTESTABLE)
.arg(cclass);
query->addClass(cclass);
continue;
}
// Evaluate the expression which can return false (no match),