Yes, this is wrong. I'll update that. Should be just "v".

--
Konstantin Orekhov
korekhov@ebay.com<mailto:korekhov@ebay.com>
Office: (408) 967-9059
Cell: (408) 364-6497

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:23 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)


Agreed on the hostname search, that's good - it's the beginning of the line I'm looking at where it used to return v (the record) and now returns v.options.

—
Reply to this email directly or view it on GitHub<https://github.com/theforeman/smart-proxy/pull/87/files#r4419445>.