google / google/gopacket

Out-of-date Z-Flag in DNS headers (AD, CD are missing)

Open
#1,225 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
6.8k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Currently, the Z flag in the DNS struct spans 3 bits. In the most recent IANA definition, however, the Z flag only uses 1 bit, the last three being used for DNSSEC-related purposes (I think):

| Bit | Flag | Description | Reference |
|-------|------|--------------------------|----------------------------------------|
| bit 5 | AA | Authoritative Answer | [RFC1035] |
| bit 6 | TC | Truncated Response | [RFC1035] |
| bit 7 | RD | Recursion Desired | [RFC1035] |
| bit 8 | RA | Recursion Available | [RFC1035] |
| bit 9 | | Reserved | |
| bit 10| AD | Authentic Data | [RFC4035][RFC6840][RFC Errata 4924] |
| bit 11| CD | Checking Disabled | [RFC4035][RFC6840][RFC Errata 4927] |

https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6
https://www.freesoft.org/CIE/RFC/2065/40.htm

Even though this means a breaking change, I believe is semantically important. Beyond the fact that we're not up-to-date with IANA spec, the implication of the Z flag is that it's assumed to be 'zero', which currently doesn't hold anymore.

I'd be happy to implement this change, but I'm curious to see what people think about it!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.