Browse Source

[2325] Unknown renew is now logged in dhcp6

Tomek Mrugalski 12 years ago
parent
commit
a40fac0707
2 changed files with 18 additions and 0 deletions
  1. 12 0
      src/bin/dhcp6/dhcp6_messages.mes
  2. 6 0
      src/bin/dhcp6/dhcp6_srv.cc

+ 12 - 0
src/bin/dhcp6/dhcp6_messages.mes

@@ -201,3 +201,15 @@ which the DHCPv6 server has not been configured. The cause is most likely due
 to a misconfiguration of the server. The packet processing will continue, but
 to a misconfiguration of the server. The packet processing will continue, but
 the response will only contain generic configuration parameters and no
 the response will only contain generic configuration parameters and no
 addresses or prefixes.
 addresses or prefixes.
+
+% DHCP6_UNKNOWN_RENEW received RENEW from client (duid=%1, iaid=%2) in subnet %3
+This warning message is printed when client attempts to renew a lease, but no
+such lease is known by the server. This typically means that client attempts to
+use its lease past its lifetime, e.g. due to time adjustment or poor support
+for sleep/recovery. Properly implemented client will recover from such case
+(it should restart lease allocation process after receiving a negative reply
+from the server). Alternatively, it may mean that the server lost its
+database recently and does not recognize its well behaving clients. This
+is likely the case if you see many such messages. Clients will recover from
+this, but they will likely get another IP addresses and experience brief
+service interruption.

+ 6 - 0
src/bin/dhcp6/dhcp6_srv.cc

@@ -583,6 +583,12 @@ OptionPtr Dhcpv6Srv::renewIA_NA(const Subnet6Ptr& subnet, const DuidPtr& duid,
         // Insert status code NoAddrsAvail.
         // Insert status code NoAddrsAvail.
         ia_rsp->addOption(createStatusCode(STATUS_NoAddrsAvail,
         ia_rsp->addOption(createStatusCode(STATUS_NoAddrsAvail,
                           "Sorry, no known leases for this duid/iaid."));
                           "Sorry, no known leases for this duid/iaid."));
+
+        LOG_DEBUG(dhcp6_logger, DBG_DHCP6_DETAIL, DHCP6_UNKNOWN_RENEW)
+            .arg(duid->toText())
+            .arg(ia->getIAID())
+            .arg(subnet->toText());
+
         return (ia_rsp);
         return (ia_rsp);
     }
     }