Browse Source

[3322] Debug log message added for relay-override

Tomek Mrugalski 11 years ago
parent
commit
1280b91ed7
2 changed files with 17 additions and 2 deletions
  1. 7 2
      src/lib/dhcpsrv/cfgmgr.cc
  2. 10 0
      src/lib/dhcpsrv/dhcpsrv_messages.mes

+ 7 - 2
src/lib/dhcpsrv/cfgmgr.cc

@@ -169,12 +169,14 @@ CfgMgr::getSubnet6(const isc::asiolink::IOAddress& hint,
         // If the hint is a relay address, and there is relay info specified
         // for this subnet and those two match, then use this subnet.
         if (relay && ((*subnet)->getRelayInfo().addr_ == hint) ) {
+            LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE,
+                      DHCPSRV_CFGMGR_SUBNET6_RELAY)
+                .arg((*subnet)->toText()).arg(hint.toText());
             return (*subnet);
         }
 
         if ((*subnet)->inRange(hint)) {
-            LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE,
-                      DHCPSRV_CFGMGR_SUBNET6)
+            LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE, DHCPSRV_CFGMGR_SUBNET6)
                       .arg((*subnet)->toText()).arg(hint.toText());
             return (*subnet);
         }
@@ -239,6 +241,9 @@ CfgMgr::getSubnet4(const isc::asiolink::IOAddress& hint,
         // If the hint is a relay address, and there is relay info specified
         // for this subnet and those two match, then use this subnet.
         if (relay && ((*subnet)->getRelayInfo().addr_ == hint) ) {
+            LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE,
+                      DHCPSRV_CFGMGR_SUBNET4_RELAY)
+                .arg((*subnet)->toText()).arg(hint.toText());
             return (*subnet);
         }
 

+ 10 - 0
src/lib/dhcpsrv/dhcpsrv_messages.mes

@@ -112,11 +112,21 @@ This is a debug message reporting that the DHCP configuration manager has
 returned the specified IPv4 subnet when given the address hint specified
 as the address is within the subnet.
 
+% DHCPSRV_CFGMGR_SUBNET4_RELAY selected subnet %1, because of matching relay addr %2
+This is a debug message reporting that the DHCP configuration manager has
+returned the specified IPv4 subnet, because detected relay agent address
+matches value specified for this subnet.
+
 % DHCPSRV_CFGMGR_SUBNET6 retrieved subnet %1 for address hint %2
 This is a debug message reporting that the DHCP configuration manager has
 returned the specified IPv6 subnet when given the address hint specified
 as the address is within the subnet.
 
+% DHCPSRV_CFGMGR_SUBNET6_RELAY selected subnet %1, because of matching relay addr %2
+This is a debug message reporting that the DHCP configuration manager has
+returned the specified IPv6 subnet, because detected relay agent address
+matches value specified for this subnet.
+
 % DHCPSRV_CFGMGR_SUBNET6_IFACE selected subnet %1 for packet received over interface %2
 This is a debug message reporting that the DHCP configuration manager
 has returned the specified IPv6 subnet for a packet received over