2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-04 16:05:17 +00:00

minor changes

This commit is contained in:
Razvan Becheriu
2018-02-19 19:28:03 +02:00
parent 8988dd30bd
commit 89f9332e68

View File

@@ -626,8 +626,11 @@ public:
std::string hostname(hostname_buffer_,
hostname_buffer_ + hostname_length_);
// Recreate the hardware address.
HWAddrPtr hwaddr(new HWAddr(hwaddr_buffer_, hwaddr_length_, HTYPE_ETHER));
/// Set hardware address if it was set
HWAddrPtr hwaddr;
if (hwaddr_null_ == MLM_FALSE) {
hwaddr.reset(new HWAddr(hwaddr_buffer_, hwaddr_length_, HTYPE_ETHER));
}
// note that T1 and T2 are not stored
Lease4Ptr lease(new Lease4(addr4_, hwaddr,
@@ -1764,7 +1767,7 @@ MySqlLeaseMgr::getLeases4(SubnetID subnet_id) const {
Lease4Collection
MySqlLeaseMgr::getLeases4() const {
LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE_DETAIL, DHCPSRV_MYSQL_GET4);
LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE_DETAIL, DHCPSRV_MYSQL_GET4);
Lease4Collection result;
getLeaseCollection(GET_LEASE4, 0, result);