|
From: Garth P. <ga...@tw...> - 2014-05-09 19:19:35
|
Is it sufficient to set the search path to an empty array?
lookup.setSearchPath(new String[0]);
On Fri, May 9, 2014 at 11:55 AM, Garth Patil <ga...@tw...> wrote:
> I am using the dnsjava library to query a NAPTR record:
>
> SimpleResolver resolver = new SimpleResolver(X.X.X.X);
> resolver.setPort(53);
> Lookup lookup = new Lookup("2.1.2.1.5.5.5.5.1.4.1.1.e164enum.net",
> Type.NAPTR);
> lookup.setResolver(resolver);
> Record[] records = lookup.run();
>
> When the initial query fails for some reason (e.g. REFUSED), the
> library seems to be adding additional terminating domains to the end
> of the hostname string. E.g.
> "2.1.2.1.5.5.5.5.1.4.1.1.e164enum.net"
> becomes
> "2.1.2.1.5.5.5.5.1.4.1.1.e164enum.net.blah.com"
> "2.1.2.1.5.5.5.5.1.4.1.1.e164enum.net.foo.net"
>
> These are specified in my /etc/resolve.conf as
>
> search blah.com foo.net
>
> Is there a way to tell the lookup that the initial name passed to the
> Lookup constructor is absolute, and no additional resolution should be
> done?
>
> Thanks,
> Garth
|