Commit c1270cb6 authored by Francis Dupont's avatar Francis Dupont

[4097a] Addressed not configured class VENDOR_CLASS_*

parent f397db49
......@@ -840,9 +840,14 @@ Dhcpv4Srv::buildCfgOptionList(Dhcpv4Exchange& ex) {
getClientClassDictionary()->findClass(*cclass);
if (!ccdef) {
// Not found: the class is not configured
LOG_DEBUG(options4_logger, DBG_DHCP4_BASIC, DHCP4_CLASS_UNCONFIGURED)
.arg(ex.getQuery()->getLabel())
.arg(*cclass);
if (((*cclass).size() <= VENDOR_CLASS_PREFIX.size()) ||
((*cclass).compare(0, VENDOR_CLASS_PREFIX.size(), VENDOR_CLASS_PREFIX) != 0)) {
// Not a VENDOR_CLASS_* so should be configured
LOG_DEBUG(options4_logger, DBG_DHCP4_BASIC, DHCP4_CLASS_UNCONFIGURED)
.arg(ex.getQuery()->getLabel())
.arg(*cclass);
}
// Skip it
continue;
}
if (ccdef->getCfgOption()->empty()) {
......
......@@ -908,8 +908,13 @@ Dhcpv6Srv::buildCfgOptionList(const Pkt6Ptr& question,
getClientClassDictionary()->findClass(*cclass);
if (!ccdef) {
// Not found: the class is not configured
LOG_DEBUG(dhcp6_logger, DBG_DHCP6_BASIC, DHCP6_CLASS_UNCONFIGURED)
.arg(*cclass);
if (((*cclass).size() <= VENDOR_CLASS_PREFIX.size()) ||
((*cclass).compare(0, VENDOR_CLASS_PREFIX.size(), VENDOR_CLASS_PREFIX) != 0)) {
// Not a VENDOR_CLASS_* so should be configured
LOG_DEBUG(dhcp6_logger, DBG_DHCP6_BASIC, DHCP6_CLASS_UNCONFIGURED)
.arg(*cclass);
}
// Skip it
continue;
}
if (ccdef->getCfgOption()->empty()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment