From 713de60daca960289dfb6261b1ffb2de9a325396 Mon Sep 17 00:00:00 2001 From: Jon Fautley Date: Tue, 6 Jul 2010 13:12:00 +0100 Subject: [PATCH] Don't use MAC address as matching parameter when using 'spoof' --- app/controllers/unattended_controller.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/app/controllers/unattended_controller.rb b/app/controllers/unattended_controller.rb index e26f3b1..b60b61c 100644 --- a/app/controllers/unattended_controller.rb +++ b/app/controllers/unattended_controller.rb @@ -69,7 +69,7 @@ class UnattendedController < ApplicationController 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.5.5.6