Closed lstrojny closed 2 years ago
If you throw it into Wireshark as a trusted 3rd party decoder, and assuming I added an IP and UDP header correctly, it thinks the packet is malformed:
Domain Name System (query) Transaction ID: 0x0084 Flags: 0x0000 Standard query Questions: 0 Answer RRs: 1536 Authority RRs: 0 Additional RRs: 4 Answers [Malformed Packet: DNS] [Expert Info (Error/Malformed): Malformed Packet (Exception occurred)] [Malformed Packet (Exception occurred)] [Severity level: Error] [Group: Malformed]
For anybody googling this, if only for my future self: the cause was a local setup problem indeed. Unifi’s Security Gateway mDNS reflection feature ships an old version of avahi that reflects malformed mDNS packets. Turn it off, use another reflector.
avahi-daemon version on the Unify Security Gateway:
/usr/sbin/avahi-daemon --version
avahi-daemon 0.6.31
Unify firmware version:
cat /etc/version
UniFiSecurityGateway.ER-e120.v4.4.56.5449062.211020.0831
In comparison an avahi version that works:
avahi-daemon --version
avahi-daemon 0.8
Hope this can save some poor soul who will stumble over this in the future.
This packet cannot be decoded:
This is the error:
This is the reproduction case:
Interestingly enough, https://pypi.org/project/dnslib/ cannot decode it either while https://github.com/mdns-js/node-dns-js handles it just fine.
Not sure what is going on here.