Skip to content

query of service type not returning all matches (WIN32, LINUX) #95

Description

@r10kindsofpeople

Issue: The sample app doesn't return all the records of a particular service type, as compared to the results from avahi-browser (Ubuntu 24.04) or the bonjour SDK under Win11 (mdns-sd).

Test setup is a Linux VM running multiple apps that each publish mDNS records via Avahi library with my own service type (ala _xxx-xxxx._tcp). There are multiple instances of the same app running, and also different apps (although they share similar code for publishing the mDNS records). I run the sample mdns.c app on separate VMs, one Ubuntu 24.04, one Windows 11, connected to the server via a host-only network.

When I run the sample app (Win11 or Ubuntu 24.04) with '--query _xxx-xxxx._tcp.local', I see 11 records (about 24 lines of information after parsing the TXT records), but there should be more, at least as evidenced by running avahi-browser or under Win11, 'dns-sd -B _xxx-xxxx._tcp'. There's no particular pattern to what's missing...I'm missing all records from multiple instances of app "A", but seeing responses from 2 out of the three instances for app "B". The results are repeatable.

I believe the difference is in the query, not the response. Wireshark appears to be telling me that the Avahi request contains all the expected records, and the sample app request does not. Avahi uses a "QM' request and the sample app uses a "QU" request.

The Avahi app sends the request to 224.0.0.251 and 224.0.0.251 responds to the app's IP.
The sample app sends the request to 224.0.0.251, but the server responds directly to the sample app's IP.

But I'm a Wireshark noob...it looks to me like the MDNS request from app to 224.0.0.251 already has the query results in it,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions