Project

General

Profile

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
69 69
    end
70 70
    maccond.sub!(/, $/, ')')
71 71

  
72
    conditions = (ip and (!maclist.empty?)) ? ["ip = ? and " + maccond, ip, *maclist] : ["ip = ?",ip];
72
    conditions = (ip and (!maclist.empty?) and !@spoof) ? ["ip = ? and " + maccond, ip, *maclist] : ["ip = ?",ip];
73 73
    logger.info "#{controller_name}: conditions string: " + conditions.to_s
74 74
    @host = Host.find(:first, :include => [:architecture, :media, :operatingsystem, :domain], :conditions => conditions)
75 75
    if @host.nil?
76
-