BIND 10 trac3152, updated. a0e73dd74658f2deb22fad2c7a1f56d122aa9021 [3152] Changes after review: assignIA_PD cleaned up
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Oct 7 11:12:30 UTC 2013
The branch, trac3152 has been updated
via a0e73dd74658f2deb22fad2c7a1f56d122aa9021 (commit)
from 988ee2ace62b93b41fd5261e9b27ed39335192ea (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 a0e73dd74658f2deb22fad2c7a1f56d122aa9021
Author: Tomek Mrugalski <tomasz at isc.org>
Date: Mon Oct 7 13:12:12 2013 +0200
[3152] Changes after review: assignIA_PD cleaned up
-----------------------------------------------------------------------
Summary of changes:
src/bin/dhcp6/dhcp6_srv.cc | 24 +++++++-----------------
1 file changed, 7 insertions(+), 17 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc
index 37d757c..560ed63 100644
--- a/src/bin/dhcp6/dhcp6_srv.cc
+++ b/src/bin/dhcp6/dhcp6_srv.cc
@@ -1312,18 +1312,17 @@ Dhcpv6Srv::assignIA_NA(const Subnet6Ptr& subnet, const DuidPtr& duid,
OptionPtr
Dhcpv6Srv::assignIA_PD(const Subnet6Ptr& subnet, const DuidPtr& duid,
const Pkt6Ptr& query, boost::shared_ptr<Option6IA> ia) {
+
+ // Create IA_PD 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_PD, ia->getIAID()));
+
// If there is no subnet selected for handling this IA_PD, the only thing to
// do left is to say that we are sorry, but the user won't get an address.
// As a convenience, we use a different status text to indicate that
// (compare to the same status code, but different wording below)
if (!subnet) {
- // Create empty IA_PD 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_PD,
- ia->getIAID()));
// Insert status code NoAddrsAvail.
ia_rsp->addOption(createStatusCode(STATUS_NoPrefixAvail,
@@ -1351,11 +1350,7 @@ Dhcpv6Srv::assignIA_PD(const Subnet6Ptr& subnet, const DuidPtr& duid,
// the user selects this server to do actual allocation (i.e. sends REQUEST)
// it should include this hint. That will help us during the actual lease
// allocation.
- bool fake_allocation = false;
- if (query->getType() == DHCPV6_SOLICIT) {
- /// @todo: Check if we support rapid commit
- fake_allocation = true;
- }
+ bool fake_allocation = (query->getType() == DHCPV6_SOLICIT);
CalloutHandlePtr callout_handle = getCalloutHandle(query);
@@ -1371,11 +1366,6 @@ Dhcpv6Srv::assignIA_PD(const Subnet6Ptr& subnet, const DuidPtr& duid,
fake_allocation,
callout_handle);
- // Create IA_PD 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_PD, ia->getIAID()));
-
if (!leases.empty()) {
ia_rsp->setT1(subnet->getT1());
More information about the bind10-changes
mailing list