DNS 0 NOERROR vs 22 BADTRUNC
Both DNS 0 (NOERROR) and 22 (BADTRUNC) belong to the DNS Response Codes (RCODEs) category. 0 indicates that no error condition. The query completed successfully and the response contains the requested data. Meanwhile, 22 means that bad truncation. The TSIG record was truncated in a way that makes it impossible to verify the message signature.
Mô tả
No error condition. The query completed successfully and the response contains the requested data.
Khi bạn thấy mã này
This is the normal, successful response to any DNS query — the name was resolved and the answer section contains the requested records.
Cách khắc phục
No fix needed. RCODE 0 means the DNS lookup succeeded as expected.
Mô tả
Bad truncation. The TSIG record was truncated in a way that makes it impossible to verify the message signature.
Khi bạn thấy mã này
A large DNS response was truncated (TC bit set) but the TSIG MAC was computed over the full message, making the truncated version unverifiable.
Cách khắc phục
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.
Sự khác biệt chính
DNS 0: No error condition. The query completed successfully and the response contains the requested data.
DNS 22: Bad truncation. The TSIG record was truncated in a way that makes it impossible to verify the message signature.
You encounter 0 when this is the normal, successful response to any DNS query — the name was resolved and the answer section contains the requested records.
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.
Khi nào dùng cái nào
For 0 (NOERROR): No fix needed. RCODE 0 means the DNS lookup succeeded as expected. 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.