Skip to content

Commit 8d05ff7

Browse files
chreoChristian Elmerot
and
Christian Elmerot
authored
Add support for missing Extended DNS Error Codes (EDE) (#1585)
Extended DNS Error (EDE) codes were missing for code points 25-30. These are documented in: https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#extended-dns-error-codes Co-authored-by: Christian Elmerot <[email protected]>
1 parent 347f250 commit 8d05ff7

File tree

1 file changed

+37
-25
lines changed

1 file changed

+37
-25
lines changed

edns.go

+37-25
Original file line numberDiff line numberDiff line change
@@ -756,36 +756,48 @@ const (
756756
ExtendedErrorCodeNoReachableAuthority
757757
ExtendedErrorCodeNetworkError
758758
ExtendedErrorCodeInvalidData
759+
ExtendedErrorCodeSignatureExpiredBeforeValid
760+
ExtendedErrorCodeTooEarly
761+
ExtendedErrorCodeUnsupportedNSEC3IterValue
762+
ExtendedErrorCodeUnableToConformToPolicy
763+
ExtendedErrorCodeSynthesized
764+
ExtendedErrorCodeInvalidQueryType
759765
)
760766

761767
// ExtendedErrorCodeToString maps extended error info codes to a human readable
762768
// description.
763769
var ExtendedErrorCodeToString = map[uint16]string{
764-
ExtendedErrorCodeOther: "Other",
765-
ExtendedErrorCodeUnsupportedDNSKEYAlgorithm: "Unsupported DNSKEY Algorithm",
766-
ExtendedErrorCodeUnsupportedDSDigestType: "Unsupported DS Digest Type",
767-
ExtendedErrorCodeStaleAnswer: "Stale Answer",
768-
ExtendedErrorCodeForgedAnswer: "Forged Answer",
769-
ExtendedErrorCodeDNSSECIndeterminate: "DNSSEC Indeterminate",
770-
ExtendedErrorCodeDNSBogus: "DNSSEC Bogus",
771-
ExtendedErrorCodeSignatureExpired: "Signature Expired",
772-
ExtendedErrorCodeSignatureNotYetValid: "Signature Not Yet Valid",
773-
ExtendedErrorCodeDNSKEYMissing: "DNSKEY Missing",
774-
ExtendedErrorCodeRRSIGsMissing: "RRSIGs Missing",
775-
ExtendedErrorCodeNoZoneKeyBitSet: "No Zone Key Bit Set",
776-
ExtendedErrorCodeNSECMissing: "NSEC Missing",
777-
ExtendedErrorCodeCachedError: "Cached Error",
778-
ExtendedErrorCodeNotReady: "Not Ready",
779-
ExtendedErrorCodeBlocked: "Blocked",
780-
ExtendedErrorCodeCensored: "Censored",
781-
ExtendedErrorCodeFiltered: "Filtered",
782-
ExtendedErrorCodeProhibited: "Prohibited",
783-
ExtendedErrorCodeStaleNXDOMAINAnswer: "Stale NXDOMAIN Answer",
784-
ExtendedErrorCodeNotAuthoritative: "Not Authoritative",
785-
ExtendedErrorCodeNotSupported: "Not Supported",
786-
ExtendedErrorCodeNoReachableAuthority: "No Reachable Authority",
787-
ExtendedErrorCodeNetworkError: "Network Error",
788-
ExtendedErrorCodeInvalidData: "Invalid Data",
770+
ExtendedErrorCodeOther: "Other",
771+
ExtendedErrorCodeUnsupportedDNSKEYAlgorithm: "Unsupported DNSKEY Algorithm",
772+
ExtendedErrorCodeUnsupportedDSDigestType: "Unsupported DS Digest Type",
773+
ExtendedErrorCodeStaleAnswer: "Stale Answer",
774+
ExtendedErrorCodeForgedAnswer: "Forged Answer",
775+
ExtendedErrorCodeDNSSECIndeterminate: "DNSSEC Indeterminate",
776+
ExtendedErrorCodeDNSBogus: "DNSSEC Bogus",
777+
ExtendedErrorCodeSignatureExpired: "Signature Expired",
778+
ExtendedErrorCodeSignatureNotYetValid: "Signature Not Yet Valid",
779+
ExtendedErrorCodeDNSKEYMissing: "DNSKEY Missing",
780+
ExtendedErrorCodeRRSIGsMissing: "RRSIGs Missing",
781+
ExtendedErrorCodeNoZoneKeyBitSet: "No Zone Key Bit Set",
782+
ExtendedErrorCodeNSECMissing: "NSEC Missing",
783+
ExtendedErrorCodeCachedError: "Cached Error",
784+
ExtendedErrorCodeNotReady: "Not Ready",
785+
ExtendedErrorCodeBlocked: "Blocked",
786+
ExtendedErrorCodeCensored: "Censored",
787+
ExtendedErrorCodeFiltered: "Filtered",
788+
ExtendedErrorCodeProhibited: "Prohibited",
789+
ExtendedErrorCodeStaleNXDOMAINAnswer: "Stale NXDOMAIN Answer",
790+
ExtendedErrorCodeNotAuthoritative: "Not Authoritative",
791+
ExtendedErrorCodeNotSupported: "Not Supported",
792+
ExtendedErrorCodeNoReachableAuthority: "No Reachable Authority",
793+
ExtendedErrorCodeNetworkError: "Network Error",
794+
ExtendedErrorCodeInvalidData: "Invalid Data",
795+
ExtendedErrorCodeSignatureExpiredBeforeValid: "Signature Expired Before Valid",
796+
ExtendedErrorCodeTooEarly: "Too Early",
797+
ExtendedErrorCodeUnsupportedNSEC3IterValue: "Unsupported NSEC3 Iterations Value",
798+
ExtendedErrorCodeUnableToConformToPolicy: "Unable To Conform To Policy",
799+
ExtendedErrorCodeSynthesized: "Synthesized",
800+
ExtendedErrorCodeInvalidQueryType: "Invalid Query Type",
789801
}
790802

791803
// StringToExtendedErrorCode is a map from human readable descriptions to

0 commit comments

Comments
 (0)