2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 21:45:37 +00:00

[gitlab9] Imported relevant bits from github99

- Covers changes up to 4358737d43ee1b6c8618a1a8aa3cc7273634ed48,
   but without unnecessary things.
This commit is contained in:
Tomek Mrugalski
2018-08-13 17:47:53 +02:00
parent d30cc343da
commit 64b3502642
11 changed files with 120 additions and 2 deletions

View File

@@ -184,7 +184,7 @@ tagged_statements = { {
"state, user_context "
"FROM lease6 "
"WHERE address = ? AND lease_type = ?"},
{MySqlLeaseMgr::GET_LEASE6_DUID_IAID,
{MySqlLeaseMgr::GET_LEASE6_DUID_IAID,
"SELECT address, duid, valid_lifetime, "
"expire, subnet_id, pref_lifetime, "
"lease_type, iaid, prefix_len, "
@@ -2220,6 +2220,23 @@ MySqlLeaseMgr::getLeases6() const {
return (result);
}
Lease6Collection
MySqlLeaseMgr::getLeases6(const DUID& duid) const {
LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE_DETAIL, DHCPSRV_MYSQL_GET_DUID);
Lease6Collection result = getLeases6();
//erase the ones not containing the matching DUID
for (auto iter = result.begin(); iter != result.end();
iter++) {
if ((*iter)->duid_->getDuid() != duid.getDuid()) {
result.erase(iter);
}
}
return result;
}
Lease6Collection
MySqlLeaseMgr::getLeases6(const asiolink::IOAddress& lower_bound_address,
const LeasePageSize& page_size) const {