]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
move DNS to using new UNIONs
authorAlan T. DeKok <aland@freeradius.org>
Sat, 22 Nov 2025 00:30:26 +0000 (19:30 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 22 Nov 2025 00:30:26 +0000 (19:30 -0500)
share/dictionary/dns/dictionary.rfc1034
src/tests/unit/protocols/dns/bad-cookie.txt
src/tests/unit/protocols/dns/base.txt
src/tests/unit/protocols/dns/opt41.txt

index daa6d2d6c9449ec0c347bc97728d6c2a3d475c4d..117e9dc7e13edd65f44137c500a744a8134da839 100644 (file)
@@ -72,22 +72,24 @@ MEMBER              Name                                    string  dns_label
 MEMBER         Type                                    uint16  key
 MEMBER         Class                                   uint16 enum=@.Question.Class
 MEMBER         TTL                                     time_delta
+MEMBER         RDATA                                   union   key=Type
 
 ######################################################################
 #
 #  Now we have resource records
 #
 ######################################################################
-STRUCT A                               Type                    1       length=uint16
+BEGIN Resource-Record.RDATA
+ATTRIBUTE      A                                       1       struct length=uint16
 MEMBER         IP                                      ipaddr
 
-STRUCT NS                              Type                    2       length=uint16
+ATTRIBUTE      NS                                      2       struct length=uint16
 MEMBER         Domain-Name                             string  dns_label
 
-STRUCT CNAME                           Type                    5       length=uint16
+ATTRIBUTE      CNAME                                   5       struct length=uint16
 MEMBER         Domain-Name                             string  dns_label
 
-STRUCT SOA                             Type                    6       length=uint16
+ATTRIBUTE      SOA                                     6       struct length=uint16
 MEMBER         Master-Name                             string  dns_label
 MEMBER         Responsible-Name                        string  dns_label
 MEMBER         Serial                                  uint32
@@ -96,20 +98,20 @@ MEMBER              Retry                                   time_delta
 MEMBER         Expire                                  time_delta
 MEMBER         Minimum                                 time_delta
 
-STRUCT PTR                             Type                    12      length=uint16
+ATTRIBUTE      PTR                                     12      struct length=uint16
 MEMBER         Domain-Name                             string  dns_label
 
-STRUCT MX                              Type                    15      length=uint16
+ATTRIBUTE      MX                                      15      struct length=uint16
 MEMBER         Preference                              uint32
 MEMBER         Domain-Name                             string  dns_label
 
-STRUCT TXT                             Type                    16      length=uint16
+ATTRIBUTE      TXT                                     16      struct length=uint16
 MEMBER         Data                                    string
 
-STRUCT AAAA                            Type                    28      length=uint16
+ATTRIBUTE      AAAA                                    28      struct length=uint16
 MEMBER         IP                                      ipv6addr
 
-STRUCT DHCID                           type                    49      length=uint16
+ATTRIBUTE      DHCID                                   49      struct length=uint16
 MEMBER         Identifier-Type-Code                    uint16
 MEMBER         Digest-Type-Code                        uint8
 MEMBER         Digest                                  octets
@@ -128,7 +130,7 @@ VALUE       Digest-Type-Code                SHA-256                 1
 #  4 octets TTL - extended Rcode and flags
 #  2 octets RDLEN
 #  RRDATA of 16 bits code, 16 bits length of data, data
-STRUCT Opt                             Type                    41      length=uint16
+ATTRIBUTE      Opt                                     41      struct length=uint16
 MEMBER         Options                                 tlv
 
 ATTRIBUTE      LLQ                                     .1      struct
@@ -164,6 +166,8 @@ ATTRIBUTE   EDNS0-Tcp-Keepalive                     .11     uint16 # time_delta in units of 100 millisec
 
 ATTRIBUTE      Padding                                 .12     octets
 
+END Resource-Record.RDATA
+
 #  Name server RR
 DEFINE Name-Server                                     struct  clone=@.Resource-Record
 
index 930af41d7cf330950b95e8278c9c45e668e85108..350fe57150b240522e40846e6691075abac14629 100644 (file)
@@ -51,7 +51,7 @@ fuzzer-out dns
 #
 
 decode-proto f6 ab 01 20 00 01 00 00 00 00 00 01 00 00 06 00 01 00 00 29 10 00 00 00 00 00 00 0c 00 0a 00 08 36 bf 11 1f ef 2e 01 09
-match Header = { ID = 63147, Query = ::Query, Opcode = ::Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = yes, Recursion-Available = no, Reserved = no, Authentic-Data = yes, Checking-Disabled = no, Rcode = ::No-Error, Question-Count = 1, Answer-Count = 0, Name-Server-Count = 0, Additional-Records-Count = 1 }, Question = { Name = ".", Type = 6, Class = ::Internet }, Additional-Record = { Name = ".", Type = ::Opt, Class = 4096, TTL = 0, Type.Opt = { Options = { Cookie = { Client = 0x36bf111fef2e0109 } } } }
+match Header = { ID = 63147, Query = ::Query, Opcode = ::Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = yes, Recursion-Available = no, Reserved = no, Authentic-Data = yes, Checking-Disabled = no, Rcode = ::No-Error, Question-Count = 1, Answer-Count = 0, Name-Server-Count = 0, Additional-Records-Count = 1 }, Question = { Name = ".", Type = 6, Class = ::Internet }, Additional-Record = { Name = ".", Type = ::Opt, Class = 4096, TTL = 0, Opt = { Options = { Cookie = { Client = 0x36bf111fef2e0109 } } } }
 
 encode-proto -
 match f6 ab 01 20 00 01 00 00 00 00 00 01 00 00 06 00 01 00 00 29 10 00 00 00 00 00 00 0c 00 0a 00 08 36 bf 11 1f ef 2e 01 09
@@ -98,7 +98,7 @@ match f6 ab 01 20 00 01 00 00 00 00 00 01 00 00 06 00 01 00 00 29 10 00 00 00 00
 #    |   |  optdata   = '6\xbf\x11\x1f\xef.\x01\t}\x8f\xfe\x06\\co\xfb\x14-vt\x94@zs'
 #
 decode-proto f6 ab 81 87 00 01 00 00 00 00 00 01  00 00 06 00 01  00 00 29 10 00 01 00 00 00  00 1c  00 0a 00 18 36 bf 11 1f ef 2e 01 09 7d 8f fe 06 5c 63 6f fb 14 2d 76 74 94 40 7a 73
-match Header = { ID = 63147, Query = ::Response, Opcode = ::Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = yes, Recursion-Available = yes, Reserved = no, Authentic-Data = no, Checking-Disabled = no, Rcode = ::YX-Resource-Record-Set, Question-Count = 1, Answer-Count = 0, Name-Server-Count = 0, Additional-Records-Count = 1 }, Question = { Name = ".", Type = 6, Class = ::Internet }, Additional-Record = { Name = ".", Type = ::Opt, Class = 4096, TTL = 16777216, Type.Opt = { Options = { Cookie = { Client = 0x36bf111fef2e0109, Server = 0x7d8ffe065c636ffb142d767494407a73 } } } }
+match Header = { ID = 63147, Query = ::Response, Opcode = ::Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = yes, Recursion-Available = yes, Reserved = no, Authentic-Data = no, Checking-Disabled = no, Rcode = ::YX-Resource-Record-Set, Question-Count = 1, Answer-Count = 0, Name-Server-Count = 0, Additional-Records-Count = 1 }, Question = { Name = ".", Type = 6, Class = ::Internet }, Additional-Record = { Name = ".", Type = ::Opt, Class = 4096, TTL = 16777216, Opt = { Options = { Cookie = { Client = 0x36bf111fef2e0109, Server = 0x7d8ffe065c636ffb142d767494407a73 } } } }
 encode-proto -
 match f6 ab 81 87 00 01 00 00 00 00 00 01 00 00 06 00 01 00 00 29 10 00 01 00 00 00 00 1c 00 0a 00 18 36 bf 11 1f ef 2e 01 09 7d 8f fe 06 5c 63 6f fb 14 2d 76 74 94 40 7a 73
 
@@ -144,7 +144,7 @@ match f6 ab 81 87 00 01 00 00 00 00 00 01 00 00 06 00 01 00 00 29 10 00 01 00 00
 #    |   |  optdata   = '6\xbf\x11\x1f\xef.\x01\t}\x8f\xfe\x06\\co\xfb\x14-vt\x94@zs'
 #
 decode-proto b4 33 01 20 00 01 00 00 00 00 00 01 00 00 06 00 01 00 00 29 10 00 00 00 00 00 00 1c 00 0a 00 18 36 bf 11 1f ef 2e 01 09 7d 8f fe 06 5c 63 6f fb 14 2d 76 74 94 40 7a 73
-match Header = { ID = 46131, Query = ::Query, Opcode = ::Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = yes, Recursion-Available = no, Reserved = no, Authentic-Data = yes, Checking-Disabled = no, Rcode = ::No-Error, Question-Count = 1, Answer-Count = 0, Name-Server-Count = 0, Additional-Records-Count = 1 }, Question = { Name = ".", Type = 6, Class = ::Internet }, Additional-Record = { Name = ".", Type = ::Opt, Class = 4096, TTL = 0, Type.Opt = { Options = { Cookie = { Client = 0x36bf111fef2e0109, Server = 0x7d8ffe065c636ffb142d767494407a73 } } } }
+match Header = { ID = 46131, Query = ::Query, Opcode = ::Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = yes, Recursion-Available = no, Reserved = no, Authentic-Data = yes, Checking-Disabled = no, Rcode = ::No-Error, Question-Count = 1, Answer-Count = 0, Name-Server-Count = 0, Additional-Records-Count = 1 }, Question = { Name = ".", Type = 6, Class = ::Internet }, Additional-Record = { Name = ".", Type = ::Opt, Class = 4096, TTL = 0, Opt = { Options = { Cookie = { Client = 0x36bf111fef2e0109, Server = 0x7d8ffe065c636ffb142d767494407a73 } } } }
 encode-proto -
 match b4 33 01 20 00 01 00 00 00 00 00 01 00 00 06 00 01 00 00 29 10 00 00 00 00 00 00 1c 00 0a 00 18 36 bf 11 1f ef 2e 01 09 7d 8f fe 06 5c 63 6f fb 14 2d 76 74 94 40 7a 73
 
@@ -204,7 +204,7 @@ match b4 33 01 20 00 01 00 00 00 00 00 01 00 00 06 00 01 00 00 29 10 00 00 00 00
 #    |   |  optdata   = '6\xbf\x11\x1f\xef.\x01\t\n/\x9d\xa2\\co\xfbI\xc3[\xb1O\xa4(\xb4'
 #
 decode-proto b4 33 81 a0 00 01 00 01 00 00 00 01 00 00 06 00 01 00 00 06 00 01 00 01 4e fe 00 40 01 61 0c 72 6f 6f 74 2d 73 65 72 76 65 72 73 03 6e 65 74 00 05 6e 73 74 6c 64 0c 76 65 72 69 73 69 67 6e 2d 67 72 73 03 63 6f 6d 00 78 57 d1 92 00 00 07 08 00 00 03 84 00 09 3a 80 00 01 51 80 00 00 29 10 00 00 00 00 00 00 1c 00 0a 00 18 36 bf 11 1f ef 2e 01 09 0a 2f 9d a2 5c 63 6f fb 49 c3 5b b1 4f a4 28 b4
-match Header = { ID = 46131, Query = ::Response, Opcode = ::Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = yes, Recursion-Available = yes, Reserved = no, Authentic-Data = yes, Checking-Disabled = no, Rcode = ::No-Error, Question-Count = 1, Answer-Count = 1, Name-Server-Count = 0, Additional-Records-Count = 1 }, Question = { Name = ".", Type = 6, Class = ::Internet }, Resource-Record = { Name = ".", Type = ::SOA, Class = ::Internet, TTL = 85758, Type.SOA = { Master-Name = "a.root-servers.net", Responsible-Name = "nstld.verisign-grs.com", Serial = 2019021202, Refresh = 1800, Retry = 900, Expire = 604800, Minimum = 86400 } }, Additional-Record = { Name = ".", Type = ::Opt, Class = 4096, TTL = 0, Type.Opt = { Options = { Cookie = { Client = 0x36bf111fef2e0109, Server = 0x0a2f9da25c636ffb49c35bb14fa428b4 } } } }
+match Header = { ID = 46131, Query = ::Response, Opcode = ::Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = yes, Recursion-Available = yes, Reserved = no, Authentic-Data = yes, Checking-Disabled = no, Rcode = ::No-Error, Question-Count = 1, Answer-Count = 1, Name-Server-Count = 0, Additional-Records-Count = 1 }, Question = { Name = ".", Type = 6, Class = ::Internet }, Resource-Record = { Name = ".", Type = ::SOA, Class = ::Internet, TTL = 85758, SOA = { Master-Name = "a.root-servers.net", Responsible-Name = "nstld.verisign-grs.com", Serial = 2019021202, Refresh = 1800, Retry = 900, Expire = 604800, Minimum = 86400 } }, Additional-Record = { Name = ".", Type = ::Opt, Class = 4096, TTL = 0, Opt = { Options = { Cookie = { Client = 0x36bf111fef2e0109, Server = 0x0a2f9da25c636ffb49c35bb14fa428b4 } } } }
 
 encode-proto -
 match b4 33 81 a0 00 01 00 01 00 00 00 01 00 00 06 00 01 00 00 06 00 01 00 01 4e fe 00 40 01 61 0c 72 6f 6f 74 2d 73 65 72 76 65 72 73 03 6e 65 74 00 05 6e 73 74 6c 64 0c 76 65 72 69 73 69 67 6e 2d 67 72 73 03 63 6f 6d 00 78 57 d1 92 00 00 07 08 00 00 03 84 00 09 3a 80 00 01 51 80 00 00 29 10 00 00 00 00 00 00 1c 00 0a 00 18 36 bf 11 1f ef 2e 01 09 0a 2f 9d a2 5c 63 6f fb 49 c3 5b b1 4f a4 28 b4
index 1b1899dd6dae79e708b53fa7fd58d6bc2c0d2f96..02328ea9cfea63b615d509b5011430a6cb8cfeed 100644 (file)
@@ -17,14 +17,14 @@ fuzzer-out dns
 
 #                                                 Z  type   class   TTL
 decode-proto 00 00 80 00 00 00 00 01 00 00 00 00  00 00 01   00 01  00 00 00 10  00 04 7f 00 00 01
-match Header = { ID = 0, Query = ::Response, Opcode = ::Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = no, Recursion-Available = no, Reserved = no, Authentic-Data = no, Checking-Disabled = no, Rcode = ::No-Error, Question-Count = 0, Answer-Count = 1, Name-Server-Count = 0, Additional-Records-Count = 0 }, Resource-Record = { Name = ".", Type = ::A, Class = ::Internet, TTL = 16, Type.A = { IP = 127.0.0.1 } }
+match Header = { ID = 0, Query = ::Response, Opcode = ::Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = no, Recursion-Available = no, Reserved = no, Authentic-Data = no, Checking-Disabled = no, Rcode = ::No-Error, Question-Count = 0, Answer-Count = 1, Name-Server-Count = 0, Additional-Records-Count = 0 }, Resource-Record = { Name = ".", Type = ::A, Class = ::Internet, TTL = 16, A = { IP = 127.0.0.1 } }
 encode-proto -
 match  00 00 80 00 00 00 00 01 00 00 00 00 00 00 01 00 01 00 00 00 10 00 04 7f 00 00 01
 
 #  Really "decode RR".
 #           Z  type   class  TTL          length  IPaddr
 decode-pair 00 00 01  00 01  00 00 00 10  00 04   7f 00 00 01
-match Resource-Record = { Name = ".", Type = ::A, Class = ::Internet, TTL = 16, Type.A = { IP = 127.0.0.1 } }
+match Resource-Record = { Name = ".", Type = ::A, Class = ::Internet, TTL = 16, A = { IP = 127.0.0.1 } }
 
 encode-pair -
 match 00 00 01 00 01 00 00 00 10 00 04 7f 00 00 01
@@ -32,24 +32,24 @@ match 00 00 01 00 01 00 00 00 10 00 04 7f 00 00 01
 #
 #  And a complex label
 #
-encode-proto Header = { ID = 0, Query = Response, Opcode = Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = no, Recursion-Available = no, Reserved = no, Authentic-Data = no, Checking-Disabled = no, Rcode = No-Error, Question-Count = 0, Answer-Count = 1, Name-Server-Count = 0, Additional-Records-Count = 0 }, Resource-Record = { Name = "www.example.com", Type = A, Class = Internet, TTL = 16, Type.A = { ip = 127.0.0.1 } }
+encode-proto Header = { ID = 0, Query = Response, Opcode = Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = no, Recursion-Available = no, Reserved = no, Authentic-Data = no, Checking-Disabled = no, Rcode = No-Error, Question-Count = 0, Answer-Count = 1, Name-Server-Count = 0, Additional-Records-Count = 0 }, Resource-Record = { Name = "www.example.com", Type = A, Class = Internet, TTL = 16, A = { ip = 127.0.0.1 } }
 match 00 00 80 00 00 00 00 01 00 00 00 00 03 77 77 77 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 00 01 00 01 00 00 00 10 00 04 7f 00 00 01
 
 decode-proto -
-match Header = { ID = 0, Query = ::Response, Opcode = ::Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = no, Recursion-Available = no, Reserved = no, Authentic-Data = no, Checking-Disabled = no, Rcode = ::No-Error, Question-Count = 0, Answer-Count = 1, Name-Server-Count = 0, Additional-Records-Count = 0 }, Resource-Record = { Name = "www.example.com", Type = ::A, Class = ::Internet, TTL = 16, Type.A = { IP = 127.0.0.1 } }
+match Header = { ID = 0, Query = ::Response, Opcode = ::Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = no, Recursion-Available = no, Reserved = no, Authentic-Data = no, Checking-Disabled = no, Rcode = ::No-Error, Question-Count = 0, Answer-Count = 1, Name-Server-Count = 0, Additional-Records-Count = 0 }, Resource-Record = { Name = "www.example.com", Type = ::A, Class = ::Internet, TTL = 16, A = { IP = 127.0.0.1 } }
 
 #
 #  Check the encoder can manage counts on its own, and finishes encoding missing count attributes in the header
 #  This is regession test for the struct encoder, which would stop encoding if count attributes weren't explicitly
 #  provided resulting in a malformed header.
 #
-encode-proto Header = { ID = 0, Query = Response, Opcode = Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = no, Recursion-Available = no, Reserved = no, Authentic-Data = no, Checking-Disabled = no, Rcode = No-Error }, Resource-Record = { Name = "www.example.com", Type = A, Class = Internet, TTL = 16, Type.A = { ip = 127.0.0.1 } }
+encode-proto Header = { ID = 0, Query = Response, Opcode = Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = no, Recursion-Available = no, Reserved = no, Authentic-Data = no, Checking-Disabled = no, Rcode = No-Error }, Resource-Record = { Name = "www.example.com", Type = A, Class = Internet, TTL = 16, A = { ip = 127.0.0.1 } }
 match 00 00 80 00 00 00 00 01 00 00 00 00 03 77 77 77 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 00 01 00 01 00 00 00 10 00 04 7f 00 00 01
 
 #
 #  multiple labels (2)
 #
-encode-proto Header = { ID = 0, Query = Response, Opcode = Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = no, Recursion-Available = no, Reserved = no, Authentic-Data = no, Checking-Disabled = no, Rcode = No-Error, Question-Count = 0, Answer-Count = 2, Name-Server-Count = 0, Additional-Records-Count = 0 }, Resource-Record = { Name = "www.example.com", Type = A, Class = Internet, TTL = 16, Type.A = { IP = 127.0.0.1 } }, Resource-Record = { Name = "ftp.example.com", Type = A, Class = Internet, TTL = 16, Type.A = { IP = 127.0.0.1 } }
+encode-proto Header = { ID = 0, Query = Response, Opcode = Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = no, Recursion-Available = no, Reserved = no, Authentic-Data = no, Checking-Disabled = no, Rcode = No-Error, Question-Count = 0, Answer-Count = 2, Name-Server-Count = 0, Additional-Records-Count = 0 }, Resource-Record = { Name = "www.example.com", Type = A, Class = Internet, TTL = 16, A = { IP = 127.0.0.1 } }, Resource-Record = { Name = "ftp.example.com", Type = A, Class = Internet, TTL = 16, A = { IP = 127.0.0.1 } }
 match 00 00 80 00 00 00 00 02 00 00 00 00 03 77 77 77 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 00 01 00 01 00 00 00 10 00 04 7f 00 00 01 03 66 74 70 c0 10 00 01 00 01 00 00 00 10 00 04 7f 00 00 01
 
 #
@@ -57,7 +57,7 @@ match 00 00 80 00 00 00 00 02 00 00 00 00 03 77 77 77 07 65 78 61 6d 70 6c 65 03
 #  and then "ftp" with a pointer c010 to "example.com"
 #
 decode-proto -
-match Header = { ID = 0, Query = ::Response, Opcode = ::Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = no, Recursion-Available = no, Reserved = no, Authentic-Data = no, Checking-Disabled = no, Rcode = ::No-Error, Question-Count = 0, Answer-Count = 2, Name-Server-Count = 0, Additional-Records-Count = 0 }, Resource-Record = { Name = "www.example.com", Type = ::A, Class = ::Internet, TTL = 16, Type.A = { IP = 127.0.0.1 } }, Resource-Record = { Name = "ftp.example.com", Type = ::A, Class = ::Internet, TTL = 16, Type.A = { IP = 127.0.0.1 } }
+match Header = { ID = 0, Query = ::Response, Opcode = ::Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = no, Recursion-Available = no, Reserved = no, Authentic-Data = no, Checking-Disabled = no, Rcode = ::No-Error, Question-Count = 0, Answer-Count = 2, Name-Server-Count = 0, Additional-Records-Count = 0 }, Resource-Record = { Name = "www.example.com", Type = ::A, Class = ::Internet, TTL = 16, A = { IP = 127.0.0.1 } }, Resource-Record = { Name = "ftp.example.com", Type = ::A, Class = ::Internet, TTL = 16, A = { IP = 127.0.0.1 } }
 
 #
 #  multiple labels (3), but with all counts removed.  The counts will
@@ -68,7 +68,7 @@ match Header = { ID = 0, Query = ::Response, Opcode = ::Query, Authoritative = n
 #  about every bit of RFC correctness here, we just care to test the
 #  encoders and decoders for formatting.
 #
-encode-proto Header = { ID = 0, Query = Response, Opcode = Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = no, Recursion-Available = no, Reserved = no, Authentic-Data = no, Checking-Disabled = no, Rcode = No-Error, Question-Count = 0, Answer-Count = 3, Name-Server-Count = 0, Additional-Records-Count = 0 }, Resource-Record = { Name = "www.example.com", Type = A, Class = Internet, TTL = 16, Type.A = { IP = 127.0.0.1 } }, Resource-Record = { Name = "ftp.example.com", Type = A, Class = Internet, TTL = 16, Type.A = { IP = 127.0.0.1 } }, Resource-Record = { Name = "ns.example.com", Type = A, Class = Internet, TTL = 16, Type.A = { IP = 127.0.0.1 } }
+encode-proto Header = { ID = 0, Query = Response, Opcode = Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = no, Recursion-Available = no, Reserved = no, Authentic-Data = no, Checking-Disabled = no, Rcode = No-Error, Question-Count = 0, Answer-Count = 3, Name-Server-Count = 0, Additional-Records-Count = 0 }, Resource-Record = { Name = "www.example.com", Type = A, Class = Internet, TTL = 16, A = { IP = 127.0.0.1 } }, Resource-Record = { Name = "ftp.example.com", Type = A, Class = Internet, TTL = 16, A = { IP = 127.0.0.1 } }, Resource-Record = { Name = "ns.example.com", Type = A, Class = Internet, TTL = 16, A = { IP = 127.0.0.1 } }
 match 00 00 80 00 00 00 00 03 00 00 00 00 03 77 77 77 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00 00 01 00 01 00 00 00 10 00 04 7f 00 00 01 03 66 74 70 c0 10 00 01 00 01 00 00 00 10 00 04 7f 00 00 01 02 6e 73 c0 10 00 01 00 01 00 00 00 10 00 04 7f 00 00 01
 
 #
@@ -76,7 +76,7 @@ match 00 00 80 00 00 00 00 03 00 00 00 00 03 77 77 77 07 65 78 61 6d 70 6c 65 03
 #  and then "ftp" with a pointer c010 to "example.com"
 #
 decode-proto -
-match Header = { ID = 0, Query = ::Response, Opcode = ::Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = no, Recursion-Available = no, Reserved = no, Authentic-Data = no, Checking-Disabled = no, Rcode = ::No-Error, Question-Count = 0, Answer-Count = 3, Name-Server-Count = 0, Additional-Records-Count = 0 }, Resource-Record = { Name = "www.example.com", Type = ::A, Class = ::Internet, TTL = 16, Type.A = { IP = 127.0.0.1 } }, Resource-Record = { Name = "ftp.example.com", Type = ::A, Class = ::Internet, TTL = 16, Type.A = { IP = 127.0.0.1 } }, Resource-Record = { Name = "ns.example.com", Type = ::A, Class = ::Internet, TTL = 16, Type.A = { IP = 127.0.0.1 } }
+match Header = { ID = 0, Query = ::Response, Opcode = ::Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = no, Recursion-Available = no, Reserved = no, Authentic-Data = no, Checking-Disabled = no, Rcode = ::No-Error, Question-Count = 0, Answer-Count = 3, Name-Server-Count = 0, Additional-Records-Count = 0 }, Resource-Record = { Name = "www.example.com", Type = ::A, Class = ::Internet, TTL = 16, A = { IP = 127.0.0.1 } }, Resource-Record = { Name = "ftp.example.com", Type = ::A, Class = ::Internet, TTL = 16, A = { IP = 127.0.0.1 } }, Resource-Record = { Name = "ns.example.com", Type = ::A, Class = ::Internet, TTL = 16, A = { IP = 127.0.0.1 } }
 
 count
 match 25
index be297ce5a4e9a06daae17a100dbd202e6c5df722..16091c3d3278540c198985eb69133638f8515240 100644 (file)
@@ -6,7 +6,7 @@ proto-dictionary dns
 fuzzer-out dns
 
 decode-proto f6 ab 01 20 00 01 00 00 00 00 00 01 00 00 06 00 01 00 00 29 10 00 00 00 00 00 00 0c 00 0a 00 08 36 bf 11 1f ef 2e 01 09
-match Header = { ID = 63147, Query = ::Query, Opcode = ::Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = yes, Recursion-Available = no, Reserved = no, Authentic-Data = yes, Checking-Disabled = no, Rcode = ::No-Error, Question-Count = 1, Answer-Count = 0, Name-Server-Count = 0, Additional-Records-Count = 1 }, Question = { Name = ".", Type = 6, Class = ::Internet }, Additional-Record = { Name = ".", Type = ::Opt, Class = 4096, TTL = 0, Type.Opt = { Options = { Cookie = { Client = 0x36bf111fef2e0109 } } } }
+match Header = { ID = 63147, Query = ::Query, Opcode = ::Query, Authoritative = no, Truncated-Response = no, Recursion-Desired = yes, Recursion-Available = no, Reserved = no, Authentic-Data = yes, Checking-Disabled = no, Rcode = ::No-Error, Question-Count = 1, Answer-Count = 0, Name-Server-Count = 0, Additional-Records-Count = 1 }, Question = { Name = ".", Type = 6, Class = ::Internet }, Additional-Record = { Name = ".", Type = ::Opt, Class = 4096, TTL = 0, Opt = { Options = { Cookie = { Client = 0x36bf111fef2e0109 } } } }
 
 encode-proto -
 match f6 ab 01 20 00 01 00 00 00 00 00 01 00 00 06 00 01 00 00 29 10 00 00 00 00 00 00 0c 00 0a 00 08 36 bf 11 1f ef 2e 01 09