zeroconf icon indicating copy to clipboard operation
zeroconf copied to clipboard

Cannot browse different domain than "local".

Open stephan57160 opened this issue 6 years ago • 3 comments

I managed to create a domain ("XXX.local"), where all my machines are registered, with AVAHI configuration. I'm able to see all of them with avahi-browse, no issue there.

None is listed with "client -domain "XXX.local". (I compiled the "examples/resolv/client.go" as "client")

Adding some traces in the code, and trying to see where/how this can be fixed. Possibly, a proposal for a fix can come before end of this week.

stephan57160 avatar Jun 07 '18 12:06 stephan57160

Have you checked that the domain is set correctly to the one you are expecting? By default, the example client assumes _workstation._tcp.

grandcat avatar Jun 07 '18 16:06 grandcat

Yes, service is also set as _workstation._tcp on the other machines.

I had a look in the code and added a bunch of traces. Then, I found that the DNS answers are filtered out in "mainloop()", in one or the other tests on params.ServiceInstanceName or HasSuffix.

Finally, I passed "domain" to build the default params, in 2 places, like :

params := defaultParams(service, domain)

and obviously, defaultParams() is changed accordingly:

	func defaultParams(service, domain string) *LookupParams {
		return NewLookupParams("", service, domain, make(chan *ServiceEntry))
	}

This works fine for my case, but I'm unable to run a complete test plan.

stephan57160 avatar Jun 07 '18 16:06 stephan57160

@grandcat what do you think?

vtolstov avatar Sep 03 '18 07:09 vtolstov