class is invalid in multicast dns record for srv and txt

28 views
Skip to first unread message

Rakesh K R

unread,
Jun 28, 2020, 10:34:43 AM6/28/20
to golang-nuts
Hi,
I am using gopacket for parsing mDNS packet.
following things are missing in the decode logic of mDNS packets:
1. cache flush field is not present in DNSResourceRecord struct
2. cache flush bit and class is combine as Class struct member.

Due to point 2, Class variable will be getting invalid value if cache bit is set for this record.
For example:
Assume,
if Class of the record is IN and cache flush is not set then Class struct variable will have value of 0x0001
If Class of record is IN and cache flush is SET then class struct will have value of 0x8001
When we decode this packet DNSResourceRecord.Class will have 0x8001 and this is invalid.


Reply all
Reply to author
Forward
0 new messages