BIND 10 trac2491, updated. fca9ec102de26345c4dafb193f85a0560322f295 [2491] A few more comments added to a dhcp6_srv.cc.

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Dec 4 11:59:39 UTC 2012


The branch, trac2491 has been updated
       via  fca9ec102de26345c4dafb193f85a0560322f295 (commit)
      from  ee0836a4c450db59764158e9f9c58acad7a1c4a4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit fca9ec102de26345c4dafb193f85a0560322f295
Author: Marcin Siodelski <marcin at isc.org>
Date:   Tue Dec 4 12:59:31 2012 +0100

    [2491] A few more comments added to a dhcp6_srv.cc.

-----------------------------------------------------------------------

Summary of changes:
 src/bin/dhcp6/dhcp6_srv.cc |    6 ++++++
 1 file changed, 6 insertions(+)

-----------------------------------------------------------------------
diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc
index c1a70ce..122345c 100644
--- a/src/bin/dhcp6/dhcp6_srv.cc
+++ b/src/bin/dhcp6/dhcp6_srv.cc
@@ -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) {



More information about the bind10-changes mailing list