This is to allow a user to use a hostname as a search string in addition to MAC and IP.
I did a search of uses of find_record method and only found it was used to find an IP and MAC in the same server.rb so thought this change would not break things.
Was I wrong and this breaks something?

Thanks!
--
Konstantin Orekhov


From: Dominic Cleal <notifications@github.com<mailto:notifications@github.com>>
Reply-To: theforeman/smart-proxy <reply@reply.github.com<mailto:reply@reply.github.com>>
Date: Tuesday, May 28, 2013 11:16 AM
To: theforeman/smart-proxy <smart-proxy@noreply.github.com<mailto:smart-proxy@noreply.github.com>>
Cc: Konstantin Orekhov <korekhov@ebay.com<mailto:korekhov@ebay.com>>
Subject: Re: [smart-proxy] DHCP global search by record + pxegrub option (#87)


In lib/proxy/dhcp/server.rb:

> @@ -76,7 +76,7 @@ def find_subnet value
>      def find_record record
>        subnets.each do |s|
>          s.records.each do |v|
> -          return v if record.is_a?(String) and (v.ip == record or v.mac == record)
> +          return v.options if record.is_a?(String) and (v.ip == record or v.mac == record or v.options[:hostname] == record)


Why the change to the return value?

—
Reply to this email directly or view it on GitHub<https://github.com/theforeman/smart-proxy/pull/87/files#r4419284>.