![]() |
Kea
1.5.0
|
Code used to conduct various sanity checks. More...
#include <sanity_checker.h>
Public Member Functions | |
| void | checkLease (Lease4Ptr &lease, bool current=true) |
| Sanity checks and possibly corrects an IPv4 lease. More... | |
| void | checkLease (Lease6Ptr &lease, bool current=true) |
| Sanity checks and possibly corrects an IPv4 lease. More... | |
| template<typename LeasePtrType , typename SubnetsType > | |
| void | checkLeaseInternal (LeasePtrType &lease, const CfgConsistencyPtr &checks, const SubnetsType &subnets) |
Code used to conduct various sanity checks.
Currently used for leases.
This class is expected to be used as a simple interface sanity checker for various run-time and configuration elements. Currently is provides sanity checking and correction for subnet-id parameter in leases.
Definition at line 21 of file sanity_checker.h.
| void isc::dhcp::SanityChecker::checkLease | ( | Lease4Ptr & | lease, |
| bool | current = true |
||
| ) |
Sanity checks and possibly corrects an IPv4 lease.
Depending on the sanity-checks/lease-checks parameter value (see CfgConsistency for details), this code may print a warning, correct subnet-id or discard the lease.
| lease | Lease to be sanity-checked |
| current | specify whether to use current (true) or staging(false) config |
Definition at line 16 of file sanity_checker.cc.
References isc::dhcp::CfgMgr::getCurrentCfg(), isc::dhcp::CfgMgr::getStagingCfg(), and isc::dhcp::CfgMgr::instance().
Referenced by isc::dhcp::LeaseFileLoader::load().
Here is the call graph for this function:| void isc::dhcp::SanityChecker::checkLease | ( | Lease6Ptr & | lease, |
| bool | current = true |
||
| ) |
Sanity checks and possibly corrects an IPv4 lease.
Depending on the sanity-checks/lease-checks parameter value (see CfgConsistency for details), this code may print a warning, correct subnet-id or discard the lease.
| lease | Lease to be sanity-checked |
| current | specify whether to use current (true) or staging(false) config |
Definition at line 28 of file sanity_checker.cc.
References isc::dhcp::CfgMgr::getCurrentCfg(), isc::dhcp::CfgMgr::getStagingCfg(), and isc::dhcp::CfgMgr::instance().
Here is the call graph for this function:| void isc::dhcp::SanityChecker::checkLeaseInternal | ( | LeasePtrType & | lease, |
| const CfgConsistencyPtr & | checks, | ||
| const SubnetsType & | subnets | ||
| ) |
Definition at line 41 of file sanity_checker.cc.
References isc::dhcp::dhcpsrv_logger, isc::dhcp::CfgConsistency::LEASE_CHECK_DEL, isc::dhcp::CfgConsistency::LEASE_CHECK_FIX, isc::dhcp::CfgConsistency::LEASE_CHECK_FIX_DEL, isc::dhcp::CfgConsistency::LEASE_CHECK_NONE, isc::dhcp::CfgConsistency::LEASE_CHECK_WARN, LOG_INFO, and LOG_WARN.