Project

General

Profile

Feature #338 ยป 0001-Don-t-use-MAC-address-as-matching-parameter-when-usi.patch

Patch to ignore MAC address when using spoof - Jon Fautley, 07/06/2010 01:19 PM

View differences:

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?
    (1-1/1)