2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 05:55:28 +00:00

[lib] Extend host structure to support auth keys for reconfiguration.

See issue #83
This commit is contained in:
mayya
2018-06-10 18:45:34 +02:00
committed by Tomek Mrugalski
parent 2147c6a340
commit 2090af48c1
25 changed files with 445 additions and 65 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, "
@@ -2266,6 +2266,23 @@ MySqlLeaseMgr::getLeases6(const asiolink::IOAddress& lower_bound_address,
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);
}
void
MySqlLeaseMgr::getExpiredLeases4(Lease4Collection& expired_leases,
const size_t max_leases) const {