Feature #359 » 0001-Don-t-use-MAC-address-as-matching-parameter-when-usi.patch
| app/controllers/unattended_controller.rb | ||
|---|---|---|
|
end
|
||
|
maccond.sub!(/, $/, ')')
|
||
|
conditions = (ip and (!maclist.empty?)) ? ["ip = ? and " + maccond, ip, *maclist] : ["ip = ?",ip];
|
||
|
conditions = (ip and (!maclist.empty?) and !@spoof) ? ["ip = ? and " + maccond, ip, *maclist] : ["ip = ?",ip];
|
||
|
logger.info "#{controller_name}: conditions string: " + conditions.to_s
|
||
|
@host = Host.find(:first, :include => [:architecture, :media, :operatingsystem, :domain], :conditions => conditions)
|
||
|
if @host.nil?
|
||