/// - Configuration 12:
/// - Simple configuration with a single subnet
/// - One in-pool reservation for MAC address aa:bb:cc:dd:ee:ff
-/// - The reservations-in-subnet set to true
+/// - The reservations-in-subnet flag is set to true
///
/// - Configuration 13:
/// - Simple configuration with a single subnet as in #12
-/// - The reservations-in-subnet set to false for testing that the
+/// - The reservations-in-subnet flag is set to false for testing that the
/// reservations are ignored
///
/// - Configuration 14:
/// - Simple configuration with a single subnet
/// - Two host reservations, one out of the pool, another one in pool
-/// - The reservations-in-subnet and reservations-out-of-pool set to true
-/// to test that only out of pool reservations are honored.
+/// - The reservations-in-subnet and reservations-out-of-pool flags are set to
+/// true to test that only out of pool reservations are honored.
///
/// - Configuration 15:
/// - Use for testing authoritative flag
/// - Configuration 4:
/// - Simple configuration with a single subnet
/// - Two host reservations, one out of the pool, another one in pool
-/// - The reservations-in-subnet and reservations-out-of-pool set to true
-/// to test that only out of pool reservations are honored.
+/// - The reservations-in-subnet and reservations-out-of-pool flags are set to
+/// true to test that only out of pool reservations are honored.
///
const char* CONFIGS[] = {
// Configuration 0
auto host = ctx.hosts_.find(SUBNET_ID_GLOBAL);
// if we want global + other modes we would need to
// return only if true, else continue
- if (host != ctx.hosts_.end() &&
+ if (host != ctx.hosts_.end() && host->second &&
!host->second->getIPv4Reservation().isV4Zero()) {
return (true);
}
// reserved addresses from within the dynamic pool, and for that
// reason look only for reservations that are outside the pools,
// hence the inPool check.
- if (host != ctx.hosts_.end()) {
+ if (host != ctx.hosts_.end() && && host->second) {
auto reservation = host->second->getIPv4Reservation();
if (!reservation.isV4Zero() &&
(!subnet->getReservationsOutOfPool() ||
/// @brief Attempts to find appropriate host reservation.
///
/// Attempts to find appropriate host reservation in HostMgr. If found, it
- /// it is set in the @c ctx.hosts_.
+ /// is set in the @ref ctx.hosts_.
///
/// @node When the out-of-pool flag is enabled, because the function is
/// called only once per DHCP message, the reservations that are in-subnet
/// @brief Attempts to find the host reservation for the client.
///
/// This method attempts to find the host reservation for the client. If
- /// found, it is set in the @c ctx.hosts_.
+ /// found, it is set in the @ref ctx.hosts_.
///
/// @node When the out-of-pool flag is enabled, because the function is
/// called only once per DHCP message, the reservations that are in-subnet