aboutsummaryrefslogtreecommitdiffstats
path: root/util/dnsregistry.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-02-02 17:31:39 +0100
committerKim Alvefur <zash@zash.se>2022-02-02 17:31:39 +0100
commitc0be07a6b600329d3765c8baa14dc37eb8552620 (patch)
tree4583279131a253f1e435326cd7c3b26eee6d069b /util/dnsregistry.lua
parent8b68fc3c6c5e02afa8aebecadacba11b78ad5a75 (diff)
downloadprosody-c0be07a6b600329d3765c8baa14dc37eb8552620.tar.gz
prosody-c0be07a6b600329d3765c8baa14dc37eb8552620.zip
util.dnsregistry: Regenerate from IANA registry
Note the duplicate 9 and 16 entries, neither of which are especially relevant for our resolver usage.
Diffstat (limited to 'util/dnsregistry.lua')
-rw-r--r--util/dnsregistry.lua177
1 files changed, 120 insertions, 57 deletions
diff --git a/util/dnsregistry.lua b/util/dnsregistry.lua
index 1086ffcc..635b7e3a 100644
--- a/util/dnsregistry.lua
+++ b/util/dnsregistry.lua
@@ -1,59 +1,122 @@
-
--- Converted from
--- http://www.iana.org/assignments/dns-parameters
--- 2020-06-25
-
-local classes = {
- IN = 1; "IN";
- nil;
- CH = 3; "CH";
- HS = 4; "HS";
-};
-
-local types = {
-"A";"NS";"MD";"MF";"CNAME";"SOA";"MB";"MG";"MR";"NULL";"WKS";"PTR";"HINFO";
-"MINFO";"MX";"TXT";"RP";"AFSDB";"X25";"ISDN";"RT";"NSAP";"NSAP-PTR";"SIG";
-"KEY";"PX";"GPOS";"AAAA";"LOC";"NXT";"EID";"NIMLOC";"SRV";"ATMA";"NAPTR";
-"KX";"CERT";"A6";"DNAME";"SINK";"OPT";"APL";"DS";"SSHFP";"IPSECKEY";"RRSIG";
-"NSEC";"DNSKEY";"DHCID";"NSEC3";"NSEC3PARAM";"TLSA";"SMIMEA";[55]="HIP";
-[56]="NINFO";[57]="RKEY";[58]="TALINK";[59]="CDS";[60]="CDNSKEY";[61]="OPENPGPKEY";
-[62]="CSYNC";[63]="ZONEMD";[99]="SPF";[100]="UINFO";[101]="UID";[102]="GID";
-[103]="UNSPEC";[104]="NID";[105]="L32";[106]="L64";[107]="LP";[108]="EUI48";
-[109]="EUI64";["CSYNC"]=62;["TXT"]=16;["NAPTR"]=35;["A6"]=38;["RP"]=17;
-["TALINK"]=58;["NXT"]=30;["MR"]=9;["UINFO"]=100;["X25"]=19;["TKEY"]=249;
-["CERT"]=37;["SMIMEA"]=53;[252]="AXFR";[253]="MAILB";["CDS"]=59;[32769]="DLV";
-["RT"]=21;["WKS"]=11;[249]="TKEY";["LP"]=107;[250]="TSIG";["SSHFP"]=44;["DS"]=43;
-["ISDN"]=20;["ATMA"]=34;["NS"]=2;[257]="CAA";["PX"]=26;["MX"]=15;["TSIG"]=250;
-["EID"]=31;["TLSA"]=52;["GID"]=102;["KX"]=36;["SPF"]=99;["DOA"]=259;["GPOS"]=27;
-["IPSECKEY"]=45;["NIMLOC"]=32;["RRSIG"]=46;["UID"]=101;["DNAME"]=39;["NSAP"]=22;
-["DNSKEY"]=48;["SINK"]=40;["DHCID"]=49;[32768]="TA";["NSAP-PTR"]=23;["AAAA"]=28;
-["PTR"]=12;["MINFO"]=14;["TA"]=32768;["EUI64"]=109;[260]="AMTRELAY";
-["AMTRELAY"]=260;["CDNSKEY"]=60;[259]="DOA";["LOC"]=29;[258]="AVC";["AVC"]=258;
-["CAA"]=257;["MB"]=7;["*"]=255;[256]="URI";["URI"]=256;["SRV"]=33;["EUI48"]=108;
-[255]="*";[254]="MAILA";["MAILA"]=254;["MAILB"]=253;["CNAME"]=5;[251]="IXFR";
-["APL"]=42;["OPENPGPKEY"]=61;["MD"]=3;["NINFO"]=56;["ZONEMD"]=63;["RKEY"]=57;
-["L32"]=105;["NID"]=104;["HIP"]=55;["NSEC"]=47;["DLV"]=32769;["UNSPEC"]=103;
-["NSEC3PARAM"]=51;["MF"]=4;["MG"]=8;["AFSDB"]=18;["A"]=1;["SIG"]=24;["NSEC3"]=50;
-["HINFO"]=13;["IXFR"]=251;["NULL"]=10;["AXFR"]=252;["KEY"]=25;["OPT"]=41;
-["SOA"]=6;["L64"]=106;
-}
-
-local errors = {
- NoError = "No Error"; [0] = "NoError";
- FormErr = "Format Error"; "FormErr";
- ServFail = "Server Failure"; "ServFail";
- NXDomain = "Non-Existent Domain"; "NXDomain";
- NotImp = "Not Implemented"; "NotImp";
- Refused = "Query Refused"; "Refused";
- YXDomain = "Name Exists when it should not"; "YXDomain";
- YXRRSet = "RR Set Exists when it should not"; "YXRRSet";
- NXRRSet = "RR Set that should exist does not"; "NXRRSet";
- NotAuth = "Server Not Authoritative for zone"; "NotAuth";
- NotZone = "Name not contained in zone"; "NotZone";
-};
-
+-- Source: https://www.iana.org/assignments/dns-parameters/dns-parameters.xml
+-- Generated on 2022-02-02
return {
- classes = classes;
- types = types;
- errors = errors;
+ classes = {
+ ["IN"] = 1; [1] = "IN";
+ ["CH"] = 3; [3] = "CH";
+ ["HS"] = 4; [4] = "HS";
+ ["ANY"] = 255; [255] = "ANY";
+ };
+ types = {
+ ["A"] = 1; [1] = "A";
+ ["NS"] = 2; [2] = "NS";
+ ["MD"] = 3; [3] = "MD";
+ ["MF"] = 4; [4] = "MF";
+ ["CNAME"] = 5; [5] = "CNAME";
+ ["SOA"] = 6; [6] = "SOA";
+ ["MB"] = 7; [7] = "MB";
+ ["MG"] = 8; [8] = "MG";
+ ["MR"] = 9; [9] = "MR";
+ ["NULL"] = 10; [10] = "NULL";
+ ["WKS"] = 11; [11] = "WKS";
+ ["PTR"] = 12; [12] = "PTR";
+ ["HINFO"] = 13; [13] = "HINFO";
+ ["MINFO"] = 14; [14] = "MINFO";
+ ["MX"] = 15; [15] = "MX";
+ ["TXT"] = 16; [16] = "TXT";
+ ["RP"] = 17; [17] = "RP";
+ ["AFSDB"] = 18; [18] = "AFSDB";
+ ["X25"] = 19; [19] = "X25";
+ ["ISDN"] = 20; [20] = "ISDN";
+ ["RT"] = 21; [21] = "RT";
+ ["NSAP"] = 22; [22] = "NSAP";
+ ["NSAP-PTR"] = 23; [23] = "NSAP-PTR";
+ ["SIG"] = 24; [24] = "SIG";
+ ["KEY"] = 25; [25] = "KEY";
+ ["PX"] = 26; [26] = "PX";
+ ["GPOS"] = 27; [27] = "GPOS";
+ ["AAAA"] = 28; [28] = "AAAA";
+ ["LOC"] = 29; [29] = "LOC";
+ ["NXT"] = 30; [30] = "NXT";
+ ["EID"] = 31; [31] = "EID";
+ ["NIMLOC"] = 32; [32] = "NIMLOC";
+ ["SRV"] = 33; [33] = "SRV";
+ ["ATMA"] = 34; [34] = "ATMA";
+ ["NAPTR"] = 35; [35] = "NAPTR";
+ ["KX"] = 36; [36] = "KX";
+ ["CERT"] = 37; [37] = "CERT";
+ ["A6"] = 38; [38] = "A6";
+ ["DNAME"] = 39; [39] = "DNAME";
+ ["SINK"] = 40; [40] = "SINK";
+ ["OPT"] = 41; [41] = "OPT";
+ ["APL"] = 42; [42] = "APL";
+ ["DS"] = 43; [43] = "DS";
+ ["SSHFP"] = 44; [44] = "SSHFP";
+ ["IPSECKEY"] = 45; [45] = "IPSECKEY";
+ ["RRSIG"] = 46; [46] = "RRSIG";
+ ["NSEC"] = 47; [47] = "NSEC";
+ ["DNSKEY"] = 48; [48] = "DNSKEY";
+ ["DHCID"] = 49; [49] = "DHCID";
+ ["NSEC3"] = 50; [50] = "NSEC3";
+ ["NSEC3PARAM"] = 51; [51] = "NSEC3PARAM";
+ ["TLSA"] = 52; [52] = "TLSA";
+ ["SMIMEA"] = 53; [53] = "SMIMEA";
+ ["Unassigned"] = 54; [54] = "Unassigned";
+ ["HIP"] = 55; [55] = "HIP";
+ ["NINFO"] = 56; [56] = "NINFO";
+ ["RKEY"] = 57; [57] = "RKEY";
+ ["TALINK"] = 58; [58] = "TALINK";
+ ["CDS"] = 59; [59] = "CDS";
+ ["CDNSKEY"] = 60; [60] = "CDNSKEY";
+ ["OPENPGPKEY"] = 61; [61] = "OPENPGPKEY";
+ ["CSYNC"] = 62; [62] = "CSYNC";
+ ["ZONEMD"] = 63; [63] = "ZONEMD";
+ ["SVCB"] = 64; [64] = "SVCB";
+ ["HTTPS"] = 65; [65] = "HTTPS";
+ ["SPF"] = 99; [99] = "SPF";
+ ["NID"] = 104; [104] = "NID";
+ ["L32"] = 105; [105] = "L32";
+ ["L64"] = 106; [106] = "L64";
+ ["LP"] = 107; [107] = "LP";
+ ["EUI48"] = 108; [108] = "EUI48";
+ ["EUI64"] = 109; [109] = "EUI64";
+ ["TKEY"] = 249; [249] = "TKEY";
+ ["TSIG"] = 250; [250] = "TSIG";
+ ["IXFR"] = 251; [251] = "IXFR";
+ ["AXFR"] = 252; [252] = "AXFR";
+ ["MAILB"] = 253; [253] = "MAILB";
+ ["MAILA"] = 254; [254] = "MAILA";
+ ["*"] = 255; [255] = "*";
+ ["URI"] = 256; [256] = "URI";
+ ["CAA"] = 257; [257] = "CAA";
+ ["AVC"] = 258; [258] = "AVC";
+ ["DOA"] = 259; [259] = "DOA";
+ ["AMTRELAY"] = 260; [260] = "AMTRELAY";
+ ["TA"] = 32768; [32768] = "TA";
+ ["DLV"] = 32769; [32769] = "DLV";
+ };
+ errors = {
+ [0] = "NoError"; ["NoError"] = "No Error";
+ [1] = "FormErr"; ["FormErr"] = "Format Error";
+ [2] = "ServFail"; ["ServFail"] = "Server Failure";
+ [3] = "NXDomain"; ["NXDomain"] = "Non-Existent Domain";
+ [4] = "NotImp"; ["NotImp"] = "Not Implemented";
+ [5] = "Refused"; ["Refused"] = "Query Refused";
+ [6] = "YXDomain"; ["YXDomain"] = "Name Exists when it should not";
+ [7] = "YXRRSet"; ["YXRRSet"] = "RR Set Exists when it should not";
+ [8] = "NXRRSet"; ["NXRRSet"] = "RR Set that should exist does not";
+ [9] = "NotAuth"; ["NotAuth"] = "Server Not Authoritative for zone";
+ -- [9] = "NotAuth"; ["NotAuth"] = "Not Authorized";
+ [10] = "NotZone"; ["NotZone"] = "Name not contained in zone";
+ [11] = "DSOTYPENI"; ["DSOTYPENI"] = "DSO-TYPE Not Implemented";
+ [16] = "BADVERS"; ["BADVERS"] = "Bad OPT Version";
+ -- [16] = "BADSIG"; ["BADSIG"] = "TSIG Signature Failure";
+ [17] = "BADKEY"; ["BADKEY"] = "Key not recognized";
+ [18] = "BADTIME"; ["BADTIME"] = "Signature out of time window";
+ [19] = "BADMODE"; ["BADMODE"] = "Bad TKEY Mode";
+ [20] = "BADNAME"; ["BADNAME"] = "Duplicate key name";
+ [21] = "BADALG"; ["BADALG"] = "Algorithm not supported";
+ [22] = "BADTRUNC"; ["BADTRUNC"] = "Bad Truncation";
+ [23] = "BADCOOKIE"; ["BADCOOKIE"] = "Bad/missing Server Cookie";
+ };
};