]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2491] A few more comments added to a dhcp6_srv.cc.
authorMarcin Siodelski <marcin@isc.org>
Tue, 4 Dec 2012 11:59:31 +0000 (12:59 +0100)
committerMarcin Siodelski <marcin@isc.org>
Tue, 4 Dec 2012 11:59:31 +0000 (12:59 +0100)
src/bin/dhcp6/dhcp6_srv.cc

index c1a70cef78385d0e3889db31a32dc835d68cc0a4..122345c6e866e50b614f82805767c4635bef30c6 100644 (file)
@@ -447,6 +447,10 @@ OptionPtr Dhcpv6Srv::handleIA_NA(const Subnet6Ptr& subnet, const DuidPtr& duid,
     // but different wording below)
     if (!subnet) {
         // Create empty IA_NA option with IAID matching the request.
+        // Note that we don't use OptionDefinition class to create this option.
+        // This is because we prefer using a constructor of Option6IA that
+        // initializes IAID. Otherwise we would have to use setIAID() after
+        // creation of the option which has some performance implications.
         boost::shared_ptr<Option6IA> ia_rsp(new Option6IA(D6O_IA_NA, ia->getIAID()));
 
         // Insert status code NoAddrsAvail.
@@ -488,6 +492,8 @@ OptionPtr Dhcpv6Srv::handleIA_NA(const Subnet6Ptr& subnet, const DuidPtr& duid,
                                                       hint, fake_allocation);
 
     // Create IA_NA that we will put in the response.
+    // Do not use OptionDefinition to create option's instance so
+    // as we can initialize IAID using a constructor.
     boost::shared_ptr<Option6IA> ia_rsp(new Option6IA(D6O_IA_NA, ia->getIAID()));
 
     if (lease) {