Project

General

Profile

« Previous | Next » 

Revision ee9b08d0

Added by Greg Sutcliffe almost 10 years ago

Fixes #5907 - Look at all records when suggesting IPs

View differences:

lib/proxy/dhcp/subnet.rb
def unused_ip args = {}
# first check if we already have a record for this host
# if we do, we can simply reuse the same ip address.
if args[:mac] and r=has_mac?(args[:mac]) and valid_range(args).include?(r.ip)
if args[:mac] and r=has_mac?(args[:mac], :all) and valid_range(args).include?(r.ip)
logger.debug "Found an existing dhcp record #{r}, reusing..."
return r.ip
end

Also available in: Unified diff