-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Services published using python-zerconf or systemd-resolved are not resolved #182
Comments
I tried it locally. It seems that Python zeroconf did not send / respond with address records (TYPE_A or TYPE_AAAA). I haven't got chance to find out if / how The example query program in
|
I opened a PR #183 with some debugging code to find that python zeroconf actually included a |
My guess is, avahi is using the associated server name from the SRV record to resolve addresses when A and AAAA records are not present. |
Out of interest i grepped a bit through the code of avahi, and it seems that the naem in TYPE_SRV record is used to resolve the TYPE_A or TYPE_AAAA address: See https://github.com/avahi/avahi/blob/v0.8/avahi-core/resolve-service.c#L221 and following |
yes I suspected the same. And I updated the PR #183 to use regular lookups ( In my testing, the PR's patch is able to resolve your original python zeroconf instance: run
P.S. there is one potential issue with my current patch: |
Thanks for looking into this, i tried out the debug-resolve branch, it seems to work on windows only for me. Unfortunately it does not work on Linux for me. I guess we need to send those queries via mDNS also. PS: I don't have a Mac. |
I can provide network traces of avahi resolving this, if you like. |
avahi-resolve.zip |
I've created a minor pr to you #183 branch where it works for linux, test on windows to be done soon (tm) |
When i run this on linux, with the python program on the same host I get:
|
Also got results on windows while the program was running in a linux vm:
PS: ignore the homeasistant [...] thing there, that's probably a bug in a homeassistant addon advertising internal docker addresse which cannot be reached anyway... |
Actually I was wrong about this "homeassistant [...]", the home assistant operating system publishes this record using systemd-resolved since home-assistant/operating-system@25a0dd3 |
I've updated my pr #184 once again which entirely skips the NSEC check and now i'm also able to resolve the
|
I first was wondering why it didn't work first, your branch was missing the fix from #181 |
Tested my fix on windows, and it also works there:
|
@keepsimple1 If you like I can submit a PR only containing the actual fix that works for me without your debuggin NSEC changes. |
yes, that will be great! Thanks! |
Example python code to publish a service:
Running
avahi-browse -tpr _workstation._tcp
on the same Linux machine yields resolved resultsExample program i used to test resolving using mdns-sd
What I also noticed, when I use
avahi-publish-service worky-station _workstation._tcp. 4848
, it can be resolved successfully using the obove rust program example.The text was updated successfully, but these errors were encountered: