Skip to content

x/net/dns/dnsmessage: cannot parse mDNS SRV records #24870

Open
@mpx

Description

@mpx

DNS message compression was disabled SRV Target fields in #10622 / https://golang.org/cl/100055 (as per RFC 2782).

However, compression is explicitly allowed for the MDNS SRV target field (RFC 6762 Sec 18.14):

Unicast DNS does not allow name compression for the target host in an SRV record, [...] all Multicast DNS implementations are REQUIRED to decode compressed SRV records correctly.

Attempting to decode a Chromecast MDNS SRV record with dnsmessage.Message.Unpack now fails with the error:

unpacking Additional: SRV record: Target: compressed name in SRV resource data

Compression support for DNS SRV target fields is necessary to support MDNS. Please consider:

  • adding an option to allow compression/decompression, or
  • reverting the earlier change.

Cc @mdempsky @iangudger

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions