vagrant-landrush / landrush

A Vagrant plugin that provides a simple DNS server for Vagrant guests
MIT License
668 stars 80 forks source link

False resolve Hostname if two similar hostnames exists #311

Closed Valgard closed 5 years ago

Valgard commented 7 years ago

I have two VMs. One with hostname server.local and the other one with release.server.local. If both VMs are up then nslookup provide for both hostname the ip address of server.local.

After a little research i found in landrush/lib/landrush/store.rb on line 51 the "problem": if the searched hostname contains any saved dns-entry then the find method return this dns-entry and do not continue the search for the complete hostname.

jmeickle commented 6 years ago

Got bit by this myself when resolving foo.bar.tld and hitting the entry for bar.tld every time. There's very little explanation that this is what's happening, also, due to poor logging...

hferentschik commented 5 years ago

This is intended, see discussion around wildcard subdomains - https://github.com/vagrant-landrush/landrush/blob/master/doc/Usage.adoc#wildcard-subdomains