keepsimple1 / mdns-sd

Rust library for mDNS based Service Discovery
Apache License 2.0
89 stars 38 forks source link

Do not consider port 0 as a missing info #181

Closed hrzlgnm closed 4 months ago

hrzlgnm commented 4 months ago

I was playing around with the library and comparing results with avahi-browse and zeroconf from python. I found a service type _device-info._tcp.local. which does announce a port 0. It's used by the Linux samba implantation to announce some additional information for Mac-OS based computers, but without an actual port, by setting the port to 0.

So the _device-info.tcp.local. is never resolved for me using mdns-sd. This change should fix the issue.

I really like using this library. ❤️

If you need more information regarding this PR, please let me know.

hrzlgnm commented 4 months ago

Manually tested the change using my fork intead of the 0.10.4 crate with the fix included, and _device-info._tcp.local. got resolved correctly