]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3009] distinct log messages for first and second client classification
authorRazvan Becheriu <razvan@isc.org>
Mon, 4 Sep 2023 13:45:49 +0000 (16:45 +0300)
committerRazvan Becheriu <razvan@isc.org>
Mon, 4 Sep 2023 13:53:55 +0000 (16:53 +0300)
src/bin/dhcp4/dhcp4_messages.cc
src/bin/dhcp4/dhcp4_messages.h
src/bin/dhcp4/dhcp4_messages.mes
src/bin/dhcp4/dhcp4_srv.cc
src/bin/dhcp6/dhcp6_messages.cc
src/bin/dhcp6/dhcp6_messages.h
src/bin/dhcp6/dhcp6_messages.mes
src/bin/dhcp6/dhcp6_srv.cc

index 1c6591b33c1bdadbe0f961d6f1c1e14aabfdbc1b..74f6dc3938be43b530e36d4a010c291a10a0d6d0 100644 (file)
@@ -17,6 +17,7 @@ extern const isc::log::MessageID DHCP4_CB_ON_DEMAND_FETCH_UPDATES_FAIL = "DHCP4_
 extern const isc::log::MessageID DHCP4_CB_PERIODIC_FETCH_UPDATES_FAIL = "DHCP4_CB_PERIODIC_FETCH_UPDATES_FAIL";
 extern const isc::log::MessageID DHCP4_CB_PERIODIC_FETCH_UPDATES_RETRIES_EXHAUSTED = "DHCP4_CB_PERIODIC_FETCH_UPDATES_RETRIES_EXHAUSTED";
 extern const isc::log::MessageID DHCP4_CLASSES_ASSIGNED = "DHCP4_CLASSES_ASSIGNED";
+extern const isc::log::MessageID DHCP4_CLASSES_ASSIGNED_AFTER_SUBNET_SELECTION = "DHCP4_CLASSES_ASSIGNED_AFTER_SUBNET_SELECTION";
 extern const isc::log::MessageID DHCP4_CLASS_ASSIGNED = "DHCP4_CLASS_ASSIGNED";
 extern const isc::log::MessageID DHCP4_CLASS_UNCONFIGURED = "DHCP4_CLASS_UNCONFIGURED";
 extern const isc::log::MessageID DHCP4_CLASS_UNDEFINED = "DHCP4_CLASS_UNDEFINED";
@@ -188,7 +189,8 @@ const char* values[] = {
     "DHCP4_CB_ON_DEMAND_FETCH_UPDATES_FAIL", "error on demand attempt to fetch configuration updates from the configuration backend(s): %1",
     "DHCP4_CB_PERIODIC_FETCH_UPDATES_FAIL", "error on periodic attempt to fetch configuration updates from the configuration backend(s): %1",
     "DHCP4_CB_PERIODIC_FETCH_UPDATES_RETRIES_EXHAUSTED", "maximum number of configuration fetch attempts: 10, has been exhausted without success",
-    "DHCP4_CLASSES_ASSIGNED", "%1: client packet has been assigned to the following classes: %2",
+    "DHCP4_CLASSES_ASSIGNED", "%1: on %2 message the client packet has been assigned to the following classes: %3",
+    "DHCP4_CLASSES_ASSIGNED_AFTER_SUBNET_SELECTION", "%1: the client packet has been assigned to the following classes: %2",
     "DHCP4_CLASS_ASSIGNED", "%1: client packet has been assigned to the following class: %2",
     "DHCP4_CLASS_UNCONFIGURED", "%1: client packet belongs to an unconfigured class: %2",
     "DHCP4_CLASS_UNDEFINED", "required class %1 has no definition",
index 95f46809f0165027528b634395c438d9e9f2f46c..5c3ec57a6d0ecc5ad35c0bf3efbbdca899ff81e0 100644 (file)
@@ -18,6 +18,7 @@ extern const isc::log::MessageID DHCP4_CB_ON_DEMAND_FETCH_UPDATES_FAIL;
 extern const isc::log::MessageID DHCP4_CB_PERIODIC_FETCH_UPDATES_FAIL;
 extern const isc::log::MessageID DHCP4_CB_PERIODIC_FETCH_UPDATES_RETRIES_EXHAUSTED;
 extern const isc::log::MessageID DHCP4_CLASSES_ASSIGNED;
+extern const isc::log::MessageID DHCP4_CLASSES_ASSIGNED_AFTER_SUBNET_SELECTION;
 extern const isc::log::MessageID DHCP4_CLASS_ASSIGNED;
 extern const isc::log::MessageID DHCP4_CLASS_UNCONFIGURED;
 extern const isc::log::MessageID DHCP4_CLASS_UNDEFINED;
index 4ededface7651665f9fd57760f8d4ba61acdb226..a9f3645ce16916226f6df7dc0a9f87b412de14e8 100644 (file)
@@ -65,12 +65,19 @@ The server will continue to operate but won't make any further attempts
 to fetch configuration updates. The administrator must fix the configuration
 in the database and reload (or restart) the server.
 
-% DHCP4_CLASSES_ASSIGNED %1: client packet has been assigned to the following classes: %2
+% DHCP4_CLASSES_ASSIGNED %1: on %2 message the client packet has been assigned to the following classes: %3
 This debug message informs that incoming packet has been assigned to specified
 classes. This is a normal behavior and indicates successful operation.
 The first argument specifies the client and transaction identification
-information. The second argument includes all classes to which the
-packet has been assigned.
+information. The second argument specifies the DHCPv4 message type. The third
+argument includes all classes to which the packet has been assigned.
+
+% DHCP4_CLASSES_ASSIGNED_AFTER_SUBNET_SELECTION %1: the client packet has been assigned to the following classes: %2
+This debug message informs that incoming packet has been assigned to specified
+classes. This is a normal behavior and indicates successful operation.
+The first argument specifies the client and transaction identification
+information. The second argument includes all classes to which the packet has
+been assigned.
 
 % DHCP4_CLASS_ASSIGNED %1: client packet has been assigned to the following class: %2
 This debug message informs that incoming packet has been assigned to specified
index d9b1e8cc9cd1a7ae0c821f7df09230cbde024f8e..775985df87344f3777f75f3d54b054b57fdb38f7 100644 (file)
@@ -253,7 +253,7 @@ Dhcpv4Exchange::Dhcpv4Exchange(const AllocEnginePtr& alloc_engine,
     evaluateClasses(query, true);
 
     const ClientClasses& classes = query_->getClasses();
-    LOG_DEBUG(dhcp4_logger, DBG_DHCP4_BASIC, DHCP4_CLASSES_ASSIGNED)
+    LOG_DEBUG(dhcp4_logger, DBG_DHCP4_BASIC, DHCP4_CLASSES_ASSIGNED_AFTER_SUBNET_SELECTION)
         .arg(query_->getLabel())
         .arg(classes.toText());
 
@@ -3440,6 +3440,7 @@ Dhcpv4Srv::processDiscover(Pkt4Ptr& discover, AllocEngine::ClientContext4Ptr& co
 
         LOG_DEBUG(dhcp4_logger, DBG_DHCP4_BASIC, DHCP4_CLASSES_ASSIGNED)
             .arg(discover->getLabel())
+            .arg(discover->getName())
             .arg(discover->getClasses().toText());
 
         buildCfgOptionList(ex);
@@ -3522,6 +3523,7 @@ Dhcpv4Srv::processRequest(Pkt4Ptr& request, AllocEngine::ClientContext4Ptr& cont
 
         LOG_DEBUG(dhcp4_logger, DBG_DHCP4_BASIC, DHCP4_CLASSES_ASSIGNED)
             .arg(request->getLabel())
+            .arg(request->getName())
             .arg(request->getClasses().toText());
 
         buildCfgOptionList(ex);
@@ -3905,6 +3907,7 @@ Dhcpv4Srv::processInform(Pkt4Ptr& inform, AllocEngine::ClientContext4Ptr& contex
 
     LOG_DEBUG(dhcp4_logger, DBG_DHCP4_BASIC, DHCP4_CLASSES_ASSIGNED)
         .arg(inform->getLabel())
+        .arg(inform->getName())
         .arg(inform->getClasses().toText());
 
     buildCfgOptionList(ex);
index 76b9979a639f9c46568a1fa424760ccb715883e9..5badf5cca6d7a9ee16cc5796e6d972051d659c52 100644 (file)
@@ -18,6 +18,7 @@ extern const isc::log::MessageID DHCP6_CB_ON_DEMAND_FETCH_UPDATES_FAIL = "DHCP6_
 extern const isc::log::MessageID DHCP6_CB_PERIODIC_FETCH_UPDATES_FAIL = "DHCP6_CB_PERIODIC_FETCH_UPDATES_FAIL";
 extern const isc::log::MessageID DHCP6_CB_PERIODIC_FETCH_UPDATES_RETRIES_EXHAUSTED = "DHCP6_CB_PERIODIC_FETCH_UPDATES_RETRIES_EXHAUSTED";
 extern const isc::log::MessageID DHCP6_CLASSES_ASSIGNED = "DHCP6_CLASSES_ASSIGNED";
+extern const isc::log::MessageID DHCP6_CLASSES_ASSIGNED_AFTER_SUBNET_SELECTION = "DHCP6_CLASSES_ASSIGNED_AFTER_SUBNET_SELECTION";
 extern const isc::log::MessageID DHCP6_CLASS_ASSIGNED = "DHCP6_CLASS_ASSIGNED";
 extern const isc::log::MessageID DHCP6_CLASS_UNCONFIGURED = "DHCP6_CLASS_UNCONFIGURED";
 extern const isc::log::MessageID DHCP6_CLASS_UNDEFINED = "DHCP6_CLASS_UNDEFINED";
@@ -187,7 +188,8 @@ const char* values[] = {
     "DHCP6_CB_ON_DEMAND_FETCH_UPDATES_FAIL", "error on demand attempt to fetch configuration updates from the configuration backend(s): %1",
     "DHCP6_CB_PERIODIC_FETCH_UPDATES_FAIL", "error on periodic attempt to fetch configuration updates from the configuration backend(s): %1",
     "DHCP6_CB_PERIODIC_FETCH_UPDATES_RETRIES_EXHAUSTED", "maximum number of configuration fetch attempts: 10, has been exhausted without success",
-    "DHCP6_CLASSES_ASSIGNED", "%1: client packet has been assigned to the following classes: %2",
+    "DHCP6_CLASSES_ASSIGNED", "%1: on %2 message the client packet has been assigned to the following classes: %3",
+    "DHCP6_CLASSES_ASSIGNED_AFTER_SUBNET_SELECTION", "%1: the client packet has been assigned to the following classes: %2",
     "DHCP6_CLASS_ASSIGNED", "%1: client packet has been assigned to the following class: %2",
     "DHCP6_CLASS_UNCONFIGURED", "%1: client packet belongs to an unconfigured class: %2",
     "DHCP6_CLASS_UNDEFINED", "required class %1 has no definition",
index 935a0107d0fdd210cf1eec5f206d6af3ace1d2d6..26b9f108cbd9d2422ed55ee68e08b15c1bbda4b8 100644 (file)
@@ -19,6 +19,7 @@ extern const isc::log::MessageID DHCP6_CB_ON_DEMAND_FETCH_UPDATES_FAIL;
 extern const isc::log::MessageID DHCP6_CB_PERIODIC_FETCH_UPDATES_FAIL;
 extern const isc::log::MessageID DHCP6_CB_PERIODIC_FETCH_UPDATES_RETRIES_EXHAUSTED;
 extern const isc::log::MessageID DHCP6_CLASSES_ASSIGNED;
+extern const isc::log::MessageID DHCP6_CLASSES_ASSIGNED_AFTER_SUBNET_SELECTION;
 extern const isc::log::MessageID DHCP6_CLASS_ASSIGNED;
 extern const isc::log::MessageID DHCP6_CLASS_UNCONFIGURED;
 extern const isc::log::MessageID DHCP6_CLASS_UNDEFINED;
index 2af69b194a56e7877b458abcea973956fbe681de..88a8e7ee56855082fb9788fa4c416c3d57073adb 100644 (file)
@@ -72,12 +72,19 @@ The server will continue to operate but won't make any further attempts
 to fetch configuration updates. The administrator must fix the configuration
 in the database and reload (or restart) the server.
 
-% DHCP6_CLASSES_ASSIGNED %1: client packet has been assigned to the following classes: %2
+% DHCP6_CLASSES_ASSIGNED %1: on %2 message the client packet has been assigned to the following classes: %3
 This debug message informs that incoming packet has been assigned to specified
 classes. This is a normal behavior and indicates successful operation.
 The first argument specifies the client and transaction identification
-information. The second argument includes all classes to which the
-packet has been assigned.
+information. The second argument specifies the DHCPv6 message type. The third
+argument includes all classes to which the packet has been assigned.
+
+% DHCP6_CLASSES_ASSIGNED_AFTER_SUBNET_SELECTION %1: the client packet has been assigned to the following classes: %2
+This debug message informs that incoming packet has been assigned to specified
+classes. This is a normal behavior and indicates successful operation.
+The first argument specifies the client and transaction identification
+information. The second argument includes all classes to which the packet has
+been assigned.
 
 % DHCP6_CLASS_ASSIGNED %1: client packet has been assigned to the following class: %2
 This debug message informs that incoming packet has been assigned to specified
index 6a467f55d4ba3dafb6a97be8f599d0c5613469ee..29fa2df6a288416e7b1b4a544f5ff940a3934815 100644 (file)
@@ -573,7 +573,7 @@ Dhcpv6Srv::initContext(const Pkt6Ptr& pkt,
     evaluateClasses(pkt, true);
 
     const ClientClasses& classes = pkt->getClasses();
-    LOG_DEBUG(dhcp6_logger, DBG_DHCP6_BASIC, DHCP6_CLASSES_ASSIGNED)
+    LOG_DEBUG(dhcp6_logger, DBG_DHCP6_BASIC, DHCP6_CLASSES_ASSIGNED_AFTER_SUBNET_SELECTION)
         .arg(pkt->getLabel())
         .arg(classes.toText());
 
@@ -3547,6 +3547,7 @@ Dhcpv6Srv::processSolicit(AllocEngine::ClientContext6& ctx) {
 
     LOG_DEBUG(dhcp6_logger, DBG_DHCP6_BASIC, DHCP6_CLASSES_ASSIGNED)
         .arg(solicit->getLabel())
+        .arg(solicit->getName())
         .arg(solicit->getClasses().toText());
 
     copyClientOptions(solicit, response);
@@ -3589,6 +3590,7 @@ Dhcpv6Srv::processRequest(AllocEngine::ClientContext6& ctx) {
 
     LOG_DEBUG(dhcp6_logger, DBG_DHCP6_BASIC, DHCP6_CLASSES_ASSIGNED)
         .arg(request->getLabel())
+        .arg(request->getName())
         .arg(request->getClasses().toText());
 
     copyClientOptions(request, reply);
@@ -3627,6 +3629,7 @@ Dhcpv6Srv::processRenew(AllocEngine::ClientContext6& ctx) {
 
     LOG_DEBUG(dhcp6_logger, DBG_DHCP6_BASIC, DHCP6_CLASSES_ASSIGNED)
         .arg(renew->getLabel())
+        .arg(renew->getName())
         .arg(renew->getClasses().toText());
 
     copyClientOptions(renew, reply);
@@ -3665,6 +3668,7 @@ Dhcpv6Srv::processRebind(AllocEngine::ClientContext6& ctx) {
 
     LOG_DEBUG(dhcp6_logger, DBG_DHCP6_BASIC, DHCP6_CLASSES_ASSIGNED)
         .arg(rebind->getLabel())
+        .arg(rebind->getName())
         .arg(rebind->getClasses().toText());
 
     copyClientOptions(rebind, reply);
@@ -3690,6 +3694,7 @@ Dhcpv6Srv::processConfirm(AllocEngine::ClientContext6& ctx) {
 
     LOG_DEBUG(dhcp6_logger, DBG_DHCP6_BASIC, DHCP6_CLASSES_ASSIGNED)
         .arg(confirm->getLabel())
+        .arg(confirm->getName())
         .arg(confirm->getClasses().toText());
 
     // Get IA_NAs from the Confirm. If there are none, the message is
@@ -3784,6 +3789,7 @@ Dhcpv6Srv::processRelease(AllocEngine::ClientContext6& ctx) {
 
     LOG_DEBUG(dhcp6_logger, DBG_DHCP6_BASIC, DHCP6_CLASSES_ASSIGNED)
         .arg(release->getLabel())
+        .arg(release->getName())
         .arg(release->getClasses().toText());
 
     // Create an empty Reply message.
@@ -3814,6 +3820,7 @@ Dhcpv6Srv::processDecline(AllocEngine::ClientContext6& ctx) {
 
     LOG_DEBUG(dhcp6_logger, DBG_DHCP6_BASIC, DHCP6_CLASSES_ASSIGNED)
         .arg(decline->getLabel())
+        .arg(decline->getName())
         .arg(decline->getClasses().toText());
 
     // Create an empty Reply message.
@@ -4134,6 +4141,7 @@ Dhcpv6Srv::processInfRequest(AllocEngine::ClientContext6& ctx) {
 
     LOG_DEBUG(dhcp6_logger, DBG_DHCP6_BASIC, DHCP6_CLASSES_ASSIGNED)
         .arg(inf_request->getLabel())
+        .arg(inf_request->getName())
         .arg(inf_request->getClasses().toText());
 
     // Create a Reply packet, with the same trans-id as the client's.