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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user