diff options
author | Thomas Markwalder <tmark@isc.org> | 2024-11-19 11:17:00 +0100 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2024-11-19 11:19:15 +0100 |
commit | 9af00a75332794402b1c2400c3bb906866918d10 (patch) | |
tree | 54daaa2cb1cb1a6ee2c41b9fa61bb3dda8ad7934 | |
parent | [#3257] Fixed ChangeLog (diff) | |
download | kea-9af00a75332794402b1c2400c3bb906866918d10.tar.xz kea-9af00a75332794402b1c2400c3bb906866918d10.zip |
[#3257] Addressed review comments
Minor cosmetics:
modified: src/bin/dhcp4/dhcp4_srv.cc
modified: src/bin/dhcp6/dhcp6_srv.cc
-rw-r--r-- | src/bin/dhcp4/dhcp4_srv.cc | 5 | ||||
-rw-r--r-- | src/bin/dhcp6/dhcp6_srv.cc | 7 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc index 8942c15768..bd2d56e8ab 100644 --- a/src/bin/dhcp4/dhcp4_srv.cc +++ b/src/bin/dhcp4/dhcp4_srv.cc @@ -2893,8 +2893,9 @@ Dhcpv4Srv::createNameChangeRequests(const Lease4Ptr& lease, return; } - if ((!lease->reuseable_valid_lft_) && - (!old_lease || ddns_params.getUpdateOnRenew() || !lease->hasIdenticalFqdn(*old_lease))) { + if ((lease->reuseable_valid_lft_ == 0) && + (!old_lease || ddns_params.getUpdateOnRenew() || + !lease->hasIdenticalFqdn(*old_lease))) { if (old_lease) { // Queue's up a remove of the old lease's DNS (if needed) queueNCR(CHG_REMOVE, old_lease); diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc index fffae2da83..a9cdf827e5 100644 --- a/src/bin/dhcp6/dhcp6_srv.cc +++ b/src/bin/dhcp6/dhcp6_srv.cc @@ -2448,8 +2448,8 @@ Dhcpv6Srv::createNameChangeRequests(const Pkt6Ptr& answer, /// @todo IA_NA may contain multiple addresses. We should process /// each address individually. Currently we only process the first one. - Option6IAAddrPtr iaaddr = boost::static_pointer_cast - <Option6IAAddr>(ia_ctx.ia_rsp_->getOption(D6O_IAADDR)); + Option6IAAddrPtr iaaddr = boost::static_pointer_cast< + Option6IAAddr>(ia_ctx.ia_rsp_->getOption(D6O_IAADDR)); // We need an address to create a name-to-address mapping. // If address is missing for any reason, go to the next IA. @@ -2480,7 +2480,7 @@ Dhcpv6Srv::createNameChangeRequests(const Pkt6Ptr& answer, // The address is the same so this must be renewal. If we're not // always updating on renew, then we only renew if DNS info has // changed. - if (l->reuseable_valid_lft_ || + if ((l->reuseable_valid_lft_ > 0) || (!ctx.getDdnsParams()->getUpdateOnRenew() && (l->hostname_ == opt_fqdn->getDomainName() && l->fqdn_fwd_ == do_fwd && l->fqdn_rev_ == do_rev))) { @@ -2667,7 +2667,6 @@ Dhcpv6Srv::assignIA_NA(const Pkt6Ptr& query, } else { lease->valid_lft_ = lease->reuseable_valid_lft_; lease->preferred_lft_ = lease->reuseable_preferred_lft_; - std::cout << __LINE__ << " flagged as resuseable: " << lease->addr_.toText() << std::endl; ctx.currentIA().reused_leases_.push_back(lease); LOG_INFO(lease6_logger, DHCP6_LEASE_REUSE) .arg(query->getLabel()) |