Skip to content

Non standard use of mDNS transaction ID #123

@nuchida0

Description

@nuchida0

RFC 6762 says:

In multicast query messages, the Query Identifier SHOULD be set to zero on transmission.

However, this library seems to let miekg/dns pick up the random generated identifier by default.

FWIW, Apple's mDNSRespoder actually checks the ID with a macro mDNSOpaque16IsZero() everywhere, so this library doesn't work reliably with it.

And systemd-resolved agrees with this:
https://github.com/systemd/systemd/blob/main/src/resolve/resolved-dns-scope.c#L1236

You can let miekg/dns use zero identifier by the following:

dns.Id = func () uint16 { return 0 }

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