zeroconf
zeroconf copied to clipboard
Cannot browse different domain than "local".
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.
Have you checked that the domain is set correctly to the one you are expecting?
By default, the example client assumes _workstation._tcp
.
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.
@grandcat what do you think?