DNS 7 YXRRSET vs 22 BADTRUNC
Both DNS 7 (YXRRSET) and 22 (BADTRUNC) belong to the DNS Response Codes (RCODEs) category. 7 indicates that rR Set Exists when it should not. A resource record set exists that the update prerequisite says should not. Meanwhile, 22 means that bad truncation. The TSIG record was truncated in a way that makes it impossible to verify the message signature.
Descrição
RR Set Exists when it should not. A resource record set exists that the update prerequisite says should not.
Quando você o vê
A DNS UPDATE failed because a specific RRset (e.g., an A record) already exists when the prerequisite required it to be absent.
Como corrigir
Delete the conflicting RRset before retrying the update, or adjust your prerequisite conditions to match the actual zone state.
Descrição
Bad truncation. The TSIG record was truncated in a way that makes it impossible to verify the message signature.
Quando você o vê
A large DNS response was truncated (TC bit set) but the TSIG MAC was computed over the full message, making the truncated version unverifiable.
Como corrigir
Retry the query over TCP to avoid truncation. If using UDP, ensure your EDNS buffer size is large enough to receive the full signed response.
Diferenças principais
DNS 7: RR Set Exists when it should not. A resource record set exists that the update prerequisite says should not.
DNS 22: Bad truncation. The TSIG record was truncated in a way that makes it impossible to verify the message signature.
You encounter 7 when a DNS UPDATE failed because a specific RRset (e.g., an A record) already exists when the prerequisite required it to be absent.
You encounter 22 when a large DNS response was truncated (TC bit set) but the TSIG MAC was computed over the full message, making the truncated version unverifiable.
Quando usar qual
For 7 (YXRRSET): Delete the conflicting RRset before retrying the update, or adjust your prerequisite conditions to match the actual zone state. For 22 (BADTRUNC): Retry the query over TCP to avoid truncation. If using UDP, ensure your EDNS buffer size is large enough to receive the full signed response.