Commit 77848fb7 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[4271] Messages are now more terse.

parent 30cdc3cb
......@@ -112,49 +112,49 @@ This debug message indicates that the expression has been evaluated
to said value. This message is mostly useful during debugging of the
client classification expressions.
% EVAL_DEBUG_VENDOR_NO_OPTION Vendor option (code %1) missing, pushing result %2
% EVAL_DEBUG_VENDOR_NO_OPTION Option with code %1 missing, pushing result %2
This debug message indicates that the expression has been evaluated
and vendor option was not found. This message is mostly useful during
debugging of the client classification expressions.
% EVAL_DEBUG_VENDOR_ENTERPRISE_ID_MISMATCH Vendor option was found, but does not have expected enterprise-id (was looking for %1, option had %2), pushing result %3
% EVAL_DEBUG_VENDOR_ENTERPRISE_ID_MISMATCH Was looking for %1, option had %2, pushing result %3
This debug message indicates that the expression has been evaluated
and vendor option was found, but has different enterprise-id than specified
in the expression. This message is mostly useful during debugging of the
client classification expressions.
% EVAL_DEBUG_VENDOR_ENTERPRISE_ID Vendor option found, pushing enterprise-id %1 as result %2
% EVAL_DEBUG_VENDOR_ENTERPRISE_ID Pushing enterprise-id %1 as result %2
This debug message indicates that the expression has been evaluated and vendor
option was found and its enterprise-id is being reported. This message is mostly
useful during debugging of the client classification expressions.
% EVAL_DEBUG_VENDOR_EXISTS Vendor option exists, pushing result %1
% EVAL_DEBUG_VENDOR_EXISTS Option with enterprise-id %1 found, pushing result %2
This debug message indicates that the expression has been evaluated and vendor
option was found. This message is mostly useful during debugging of the client
classification expressions.
% EVAL_DEBUG_VENDOR_CLASS_NO_OPTION Vendor class option (code %1) missing, pushing result %2
% EVAL_DEBUG_VENDOR_CLASS_NO_OPTION Option with code %1 missing, pushing result %2
This debug message indicates that the expression has been evaluated
and vendor class option was not found. This message is mostly useful during
debugging of the client classification expressions.
% EVAL_DEBUG_VENDOR_CLASS_ENTERPRISE_ID_MISMATCH Vendor class option was found, but does not have expected enterprise-id (was looking for %1, option had %2), pushing result %3
% EVAL_DEBUG_VENDOR_CLASS_ENTERPRISE_ID_MISMATCH Was looking for %1, option had %2, pushing result %3
This debug message indicates that the expression has been evaluated
and vendor class option was found, but has different enterprise-id than specified
in the expression. This message is mostly useful during debugging of the
client classification expressions.
% EVAL_DEBUG_VENDOR_CLASS_ENTERPRISE_ID Vendor class option found, pushing enterprise-id %1 as result %2
% EVAL_DEBUG_VENDOR_CLASS_ENTERPRISE_ID Pushing enterprise-id %1 as result %2
This debug message indicates that the expression has been evaluated and vendor
class option was found and its enterprise-id is being reported. This message is mostly
useful during debugging of the client classification expressions.
% EVAL_DEBUG_VENDOR_CLASS_EXISTS Vendor class option exists, pushing result %1
% EVAL_DEBUG_VENDOR_CLASS_EXISTS Option with enterprise-id %1 found, pushing result %2
This debug message indicates that the expression has been evaluated and vendor
class option was found. This message is mostly useful during debugging of the
client classification expressions.
% EVAL_DEBUG_VENDOR_CLASS_DATA Vendor class data %1 (out of %2 received) is pushed as %3
% EVAL_DEBUG_VENDOR_CLASS_DATA Data %1 (out of %2 received) in vendor class found pushing as %3
This debug message indicates that vendor class option was found and passed
enterprise-id checks and has sufficient number of data chunks. Total numer
of chunks and value pushed are reported as debugging aid.
......@@ -1923,6 +1923,17 @@ TEST_F(TokenTest, vendor4SpecificVendorExists) {
// Case 3: option present and has matchin enterprise-id, should suceed
testVendorExists(Option::V4, 4491, 4491, "true");
addString("EVAL_DEBUG_VENDOR_NO_OPTION Option with code 125 missing, "
"pushing result false");
addString("EVAL_DEBUG_VENDOR_ENTERPRISE_ID_MISMATCH Was looking for 4491, "
"option had 1234, pushing result false");
addString("EVAL_DEBUG_VENDOR_EXISTS Option with enterprise-id 4491 "
"found, pushing result true");
logCheckVerbose(true);
EXPECT_TRUE(checkFile());
}
// This test verifies if expression vendor[4491].exist works properly in DHCPv6.
......
......@@ -696,6 +696,7 @@ void TokenVendor::evaluate(Pkt& pkt, ValueStack& values) {
// We already passed all the checks: the option is there and has specified
// enterprise-id.
LOG_DEBUG(eval_logger, EVAL_DBG_STACK, EVAL_DEBUG_VENDOR_EXISTS)
.arg(vendor->getVendorId())
.arg("true");
values.push("true");
return;
......@@ -801,6 +802,7 @@ void TokenVendorClass::evaluate(Pkt& pkt, ValueStack& values) {
// We already passed all the checks: the option is there and has specified
// enterprise-id.
LOG_DEBUG(eval_logger, EVAL_DBG_STACK, EVAL_DEBUG_VENDOR_CLASS_EXISTS)
.arg(vendor->getVendorId())
.arg("true");
values.push("true");
return;
......
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