Пример #1
0
 /**
  * Cancel an IP lease.
  *
  * @param {@code byte[]}: The MAC address on which to try and cancel a lease
  * @return {@code boolean}: True on success, false if unknown IP address
  */
 public boolean cancelLeaseOfMAC(MacAddress mac) {
   DHCPBinding binding = getDHCPbindingFromMAC(mac);
   if (binding != null) {
     binding.clearLeaseTimes();
     binding.setLeaseStatus(false);
     this.setPoolAvailability(this.getPoolAvailability() + 1);
     this.setPoolFull(false);
     return true;
   }
   return false;
 }
Пример #2
0
 /**
  * Cancel an IP lease.
  *
  * @param {@code byte[]}: The IP address on which to try and cancel a lease
  * @return {@code boolean}: True on success, false if unknown IP address
  */
 public boolean cancelLeaseOfIPv4(IPv4Address ip) {
   DHCPBinding binding = this.getDHCPbindingFromIPv4(ip);
   if (binding != null) {
     binding.clearLeaseTimes();
     binding.setLeaseStatus(false);
     this.setPoolAvailability(this.getPoolAvailability() + 1);
     this.setPoolFull(false);
     return true;
   }
   return false;
 }