From: Marcin Siodelski Date: Tue, 4 Dec 2012 11:59:31 +0000 (+0100) Subject: [2491] A few more comments added to a dhcp6_srv.cc. X-Git-Tag: bind10-1.0.0-beta-release~19^2~15^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fca9ec102de26345c4dafb193f85a0560322f295;p=thirdparty%2Fkea.git [2491] A few more comments added to a dhcp6_srv.cc. --- diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc index c1a70cef78..122345c6e8 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 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 ia_rsp(new Option6IA(D6O_IA_NA, ia->getIAID())); if (lease) {