Browse Source

Update github.com/miekg/dns

Ask Bjørn Hansen 9 years ago
parent
commit
24d32f673c
62 changed files with 5319 additions and 9537 deletions
  1. 1 1
      Godeps/Godeps.json
  2. 10 13
      vendor/github.com/miekg/dns/README.md
  3. 30 11
      vendor/github.com/miekg/dns/client.go
  4. 0 421
      vendor/github.com/miekg/dns/client_test.go
  5. 0 50
      vendor/github.com/miekg/dns/clientconfig_test.go
  6. 44 0
      vendor/github.com/miekg/dns/dane.go
  7. 9 5
      vendor/github.com/miekg/dns/defaults.go
  8. 21 17
      vendor/github.com/miekg/dns/dns.go
  9. 0 578
      vendor/github.com/miekg/dns/dns_test.go
  10. 65 8
      vendor/github.com/miekg/dns/dnssec.go
  11. 15 15
      vendor/github.com/miekg/dns/dnssec_keyscan.go
  12. 0 733
      vendor/github.com/miekg/dns/dnssec_test.go
  13. 0 79
      vendor/github.com/miekg/dns/dnsutil/util.go
  14. 0 130
      vendor/github.com/miekg/dns/dnsutil/util_test.go
  15. 1 1
      vendor/github.com/miekg/dns/doc.go
  16. 0 3
      vendor/github.com/miekg/dns/dyn_test.go
  17. 73 36
      vendor/github.com/miekg/dns/edns.go
  18. 0 48
      vendor/github.com/miekg/dns/edns_test.go
  19. 0 146
      vendor/github.com/miekg/dns/example_test.go
  20. 0 9
      vendor/github.com/miekg/dns/format.go
  21. 0 25
      vendor/github.com/miekg/dns/fuzz_test.go
  22. 16 15
      vendor/github.com/miekg/dns/generate.go
  23. 0 2346
      vendor/github.com/miekg/dns/idn/code_points.go
  24. 0 18
      vendor/github.com/miekg/dns/idn/example_test.go
  25. 0 373
      vendor/github.com/miekg/dns/idn/punycode.go
  26. 0 116
      vendor/github.com/miekg/dns/idn/punycode_test.go
  27. 0 23
      vendor/github.com/miekg/dns/issue_test.go
  28. 1 1
      vendor/github.com/miekg/dns/labels.go
  29. 0 198
      vendor/github.com/miekg/dns/labels_test.go
  30. 62 837
      vendor/github.com/miekg/dns/msg.go
  31. 340 0
      vendor/github.com/miekg/dns/msg_generate.go
  32. 630 0
      vendor/github.com/miekg/dns/msg_helpers.go
  33. 10 3
      vendor/github.com/miekg/dns/nsecx.go
  34. 0 29
      vendor/github.com/miekg/dns/nsecx_test.go
  35. 0 1381
      vendor/github.com/miekg/dns/parse_test.go
  36. 34 2
      vendor/github.com/miekg/dns/privaterr.go
  37. 0 170
      vendor/github.com/miekg/dns/privaterr_test.go
  38. 2 48
      vendor/github.com/miekg/dns/rawmsg.go
  39. 0 19
      vendor/github.com/miekg/dns/remote_test.go
  40. 38 0
      vendor/github.com/miekg/dns/reverse.go
  41. 0 85
      vendor/github.com/miekg/dns/sanitize_test.go
  42. 11 4
      vendor/github.com/miekg/dns/scan.go
  43. 36 127
      vendor/github.com/miekg/dns/scan_rr.go
  44. 39 38
      vendor/github.com/miekg/dns/server.go
  45. 0 679
      vendor/github.com/miekg/dns/server_test.go
  46. 14 11
      vendor/github.com/miekg/dns/sig0.go
  47. 0 89
      vendor/github.com/miekg/dns/sig0_test.go
  48. 47 0
      vendor/github.com/miekg/dns/smimea.go
  49. 3 42
      vendor/github.com/miekg/dns/tlsa.go
  50. 107 43
      vendor/github.com/miekg/dns/tsig.go
  51. 0 37
      vendor/github.com/miekg/dns/tsig_test.go
  52. 55 89
      vendor/github.com/miekg/dns/types.go
  53. 23 18
      vendor/github.com/miekg/dns/types_generate.go
  54. 0 42
      vendor/github.com/miekg/dns/types_test.go
  55. 1 1
      vendor/github.com/miekg/dns/udp.go
  56. 1 1
      vendor/github.com/miekg/dns/udp_other.go
  57. 34 0
      vendor/github.com/miekg/dns/udp_plan9.go
  58. 0 145
      vendor/github.com/miekg/dns/update_test.go
  59. 2 2
      vendor/github.com/miekg/dns/xfr.go
  60. 0 161
      vendor/github.com/miekg/dns/xfr_test.go
  61. 3529 0
      vendor/github.com/miekg/dns/zmsg.go
  62. 15 15
      vendor/github.com/miekg/dns/ztypes.go

+ 1 - 1
Godeps/Godeps.json

@@ -33,7 +33,7 @@
 		},
 		},
 		{
 		{
 			"ImportPath": "github.com/miekg/dns",
 			"ImportPath": "github.com/miekg/dns",
-			"Rev": "b9171237b0642de1d8e8004f16869970e065f46b"
+			"Rev": "58f52c57ce9df13460ac68200cef30a008b9c468"
 		},
 		},
 		{
 		{
 			"ImportPath": "github.com/pborman/uuid",
 			"ImportPath": "github.com/pborman/uuid",

+ 10 - 13
vendor/github.com/miekg/dns/README.md

@@ -1,4 +1,4 @@
-[![Build Status](https://travis-ci.org/miekg/dns.svg?branch=master)](https://travis-ci.org/miekg/dns)
+[![Build Status](https://travis-ci.org/miekg/dns.svg?branch=master)](https://travis-ci.org/miekg/dns) [![](https://godoc.org/github.com/miekg/dns?status.svg)](https://godoc.org/github.com/miekg/dns)
 
 
 # Alternative (more granular) approach to a DNS library
 # Alternative (more granular) approach to a DNS library
 
 
@@ -12,7 +12,7 @@ can build servers and resolvers with it.
 
 
 We try to keep the "master" branch as sane as possible and at the bleeding edge
 We try to keep the "master" branch as sane as possible and at the bleeding edge
 of standards, avoiding breaking changes wherever reasonable. We support the last
 of standards, avoiding breaking changes wherever reasonable. We support the last
-two versions of Go, currently: 1.4 and 1.5.
+two versions of Go, currently: 1.5 and 1.6.
 
 
 # Goals
 # Goals
 
 
@@ -48,6 +48,11 @@ A not-so-up-to-date-list-that-may-be-actually-current:
 * https://github.com/miekg/unbound
 * https://github.com/miekg/unbound
 * https://github.com/miekg/exdns
 * https://github.com/miekg/exdns
 * https://dnslookup.org
 * https://dnslookup.org
+* https://github.com/looterz/grimd
+* https://github.com/phamhongviet/serf-dns
+* https://github.com/mehrdadrad/mylg
+* https://github.com/bamarni/dockness
+* https://github.com/fffaraz/microdns
 
 
 Send pull request if you want to be listed here.
 Send pull request if you want to be listed here.
 
 
@@ -61,7 +66,7 @@ Send pull request if you want to be listed here.
 * Server side programming (mimicking the net/http package);
 * Server side programming (mimicking the net/http package);
 * Client side programming;
 * Client side programming;
 * DNSSEC: signing, validating and key generation for DSA, RSA and ECDSA;
 * DNSSEC: signing, validating and key generation for DSA, RSA and ECDSA;
-* EDNS0, NSID;
+* EDNS0, NSID, Cookies;
 * AXFR/IXFR;
 * AXFR/IXFR;
 * TSIG, SIG(0);
 * TSIG, SIG(0);
 * DNS over TLS: optional encrypted connection between client and server;
 * DNS over TLS: optional encrypted connection between client and server;
@@ -111,7 +116,6 @@ Example programs can be found in the `github.com/miekg/exdns` repository.
 * 340{1,2,3} - NAPTR record
 * 340{1,2,3} - NAPTR record
 * 3445 - Limiting the scope of (DNS)KEY
 * 3445 - Limiting the scope of (DNS)KEY
 * 3597 - Unknown RRs
 * 3597 - Unknown RRs
-* 4025 - IPSECKEY
 * 403{3,4,5} - DNSSEC + validation functions
 * 403{3,4,5} - DNSSEC + validation functions
 * 4255 - SSHFP record
 * 4255 - SSHFP record
 * 4343 - Case insensitivity
 * 4343 - Case insensitivity
@@ -138,8 +142,9 @@ Example programs can be found in the `github.com/miekg/exdns` repository.
 * 7043 - EUI48/EUI64 records
 * 7043 - EUI48/EUI64 records
 * 7314 - DNS (EDNS) EXPIRE Option
 * 7314 - DNS (EDNS) EXPIRE Option
 * 7553 - URI record
 * 7553 - URI record
+* 7858 - DNS over TLS: Initiation and Performance Considerations (draft)
+* 7873 - Domain Name System (DNS) Cookies (draft-ietf-dnsop-cookies)
 * xxxx - EDNS0 DNS Update Lease (draft)
 * xxxx - EDNS0 DNS Update Lease (draft)
-* yyyy - DNS over TLS: Initiation and Performance Considerations (draft)
 
 
 ## Loosely based upon
 ## Loosely based upon
 
 
@@ -147,11 +152,3 @@ Example programs can be found in the `github.com/miekg/exdns` repository.
 * `NSD`
 * `NSD`
 * `Net::DNS`
 * `Net::DNS`
 * `GRONG`
 * `GRONG`
-
-## TODO
-
-* privatekey.Precompute() when signing?
-* Last remaining RRs: APL, ATMA, A6, NSAP and NXT.
-* Missing in parsing: ISDN, UNSPEC, NSAP and ATMA.
-* NSEC(3) cover/match/closest enclose.
-* Replies with TC bit are not parsed to the end.

+ 30 - 11
vendor/github.com/miekg/dns/client.go

@@ -5,6 +5,7 @@ package dns
 import (
 import (
 	"bytes"
 	"bytes"
 	"crypto/tls"
 	"crypto/tls"
+	"encoding/binary"
 	"io"
 	"io"
 	"net"
 	"net"
 	"time"
 	"time"
@@ -28,16 +29,17 @@ type Client struct {
 	Net            string            // if "tcp" or "tcp-tls" (DNS over TLS) a TCP query will be initiated, otherwise an UDP one (default is "" for UDP)
 	Net            string            // if "tcp" or "tcp-tls" (DNS over TLS) a TCP query will be initiated, otherwise an UDP one (default is "" for UDP)
 	UDPSize        uint16            // minimum receive buffer for UDP messages
 	UDPSize        uint16            // minimum receive buffer for UDP messages
 	TLSConfig      *tls.Config       // TLS connection configuration
 	TLSConfig      *tls.Config       // TLS connection configuration
-	DialTimeout    time.Duration     // net.DialTimeout, defaults to 2 seconds
-	ReadTimeout    time.Duration     // net.Conn.SetReadTimeout value for connections, defaults to 2 seconds
-	WriteTimeout   time.Duration     // net.Conn.SetWriteTimeout value for connections, defaults to 2 seconds
+	Timeout        time.Duration     // a cumulative timeout for dial, write and read, defaults to 0 (disabled) - overrides DialTimeout, ReadTimeout and WriteTimeout when non-zero
+	DialTimeout    time.Duration     // net.DialTimeout, defaults to 2 seconds - overridden by Timeout when that value is non-zero
+	ReadTimeout    time.Duration     // net.Conn.SetReadTimeout value for connections, defaults to 2 seconds - overridden by Timeout when that value is non-zero
+	WriteTimeout   time.Duration     // net.Conn.SetWriteTimeout value for connections, defaults to 2 seconds - overridden by Timeout when that value is non-zero
 	TsigSecret     map[string]string // secret(s) for Tsig map[<zonename>]<base64 secret>, zonename must be fully qualified
 	TsigSecret     map[string]string // secret(s) for Tsig map[<zonename>]<base64 secret>, zonename must be fully qualified
 	SingleInflight bool              // if true suppress multiple outstanding queries for the same Qname, Qtype and Qclass
 	SingleInflight bool              // if true suppress multiple outstanding queries for the same Qname, Qtype and Qclass
 	group          singleflight
 	group          singleflight
 }
 }
 
 
 // Exchange performs a synchronous UDP query. It sends the message m to the address
 // Exchange performs a synchronous UDP query. It sends the message m to the address
-// contained in a and waits for an reply. Exchange does not retry a failed query, nor
+// contained in a and waits for a reply. Exchange does not retry a failed query, nor
 // will it fall back to TCP in case of truncation.
 // will it fall back to TCP in case of truncation.
 // See client.Exchange for more information on setting larger buffer sizes.
 // See client.Exchange for more information on setting larger buffer sizes.
 func Exchange(m *Msg, a string) (r *Msg, err error) {
 func Exchange(m *Msg, a string) (r *Msg, err error) {
@@ -91,8 +93,8 @@ func ExchangeConn(c net.Conn, m *Msg) (r *Msg, err error) {
 	return r, err
 	return r, err
 }
 }
 
 
-// Exchange performs an synchronous query. It sends the message m to the address
-// contained in a and waits for an reply. Basic use pattern with a *dns.Client:
+// Exchange performs a synchronous query. It sends the message m to the address
+// contained in a and waits for a reply. Basic use pattern with a *dns.Client:
 //
 //
 //	c := new(dns.Client)
 //	c := new(dns.Client)
 //	in, rtt, err := c.Exchange(message, "127.0.0.1:53")
 //	in, rtt, err := c.Exchange(message, "127.0.0.1:53")
@@ -129,6 +131,9 @@ func (c *Client) Exchange(m *Msg, a string) (r *Msg, rtt time.Duration, err erro
 }
 }
 
 
 func (c *Client) dialTimeout() time.Duration {
 func (c *Client) dialTimeout() time.Duration {
+	if c.Timeout != 0 {
+		return c.Timeout
+	}
 	if c.DialTimeout != 0 {
 	if c.DialTimeout != 0 {
 		return c.DialTimeout
 		return c.DialTimeout
 	}
 	}
@@ -170,6 +175,11 @@ func (c *Client) exchange(m *Msg, a string) (r *Msg, rtt time.Duration, err erro
 		}
 		}
 	}
 	}
 
 
+	var deadline time.Time
+	if c.Timeout != 0 {
+		deadline = time.Now().Add(c.Timeout)
+	}
+
 	if tls {
 	if tls {
 		co, err = DialTimeoutWithTLS(network, a, c.TLSConfig, c.dialTimeout())
 		co, err = DialTimeoutWithTLS(network, a, c.TLSConfig, c.dialTimeout())
 	} else {
 	} else {
@@ -192,12 +202,12 @@ func (c *Client) exchange(m *Msg, a string) (r *Msg, rtt time.Duration, err erro
 	}
 	}
 
 
 	co.TsigSecret = c.TsigSecret
 	co.TsigSecret = c.TsigSecret
-	co.SetWriteDeadline(time.Now().Add(c.writeTimeout()))
+	co.SetWriteDeadline(deadlineOrTimeout(deadline, c.writeTimeout()))
 	if err = co.WriteMsg(m); err != nil {
 	if err = co.WriteMsg(m); err != nil {
 		return nil, 0, err
 		return nil, 0, err
 	}
 	}
 
 
-	co.SetReadDeadline(time.Now().Add(c.readTimeout()))
+	co.SetReadDeadline(deadlineOrTimeout(deadline, c.readTimeout()))
 	r, err = co.ReadMsg()
 	r, err = co.ReadMsg()
 	if err == nil && r.Id != m.Id {
 	if err == nil && r.Id != m.Id {
 		err = ErrId
 		err = ErrId
@@ -274,9 +284,11 @@ func (co *Conn) ReadMsgHeader(hdr *Header) ([]byte, error) {
 
 
 	p = p[:n]
 	p = p[:n]
 	if hdr != nil {
 	if hdr != nil {
-		if _, err = UnpackStruct(hdr, p, 0); err != nil {
+		dh, _, err := unpackMsgHdr(p, 0)
+		if err != nil {
 			return nil, err
 			return nil, err
 		}
 		}
+		*hdr = dh
 	}
 	}
 	return p, err
 	return p, err
 }
 }
@@ -291,7 +303,7 @@ func tcpMsgLen(t io.Reader) (int, error) {
 	if n != 2 {
 	if n != 2 {
 		return 0, ErrShortRead
 		return 0, ErrShortRead
 	}
 	}
-	l, _ := unpackUint16(p, 0)
+	l := binary.BigEndian.Uint16(p)
 	if l == 0 {
 	if l == 0 {
 		return 0, ErrShortRead
 		return 0, ErrShortRead
 	}
 	}
@@ -383,7 +395,7 @@ func (co *Conn) Write(p []byte) (n int, err error) {
 			return 0, &Error{err: "message too large"}
 			return 0, &Error{err: "message too large"}
 		}
 		}
 		l := make([]byte, 2, lp+2)
 		l := make([]byte, 2, lp+2)
-		l[0], l[1] = packUint16(uint16(lp))
+		binary.BigEndian.PutUint16(l, uint16(lp))
 		p = append(l, p...)
 		p = append(l, p...)
 		n, err := io.Copy(w, bytes.NewReader(p))
 		n, err := io.Copy(w, bytes.NewReader(p))
 		return int(n), err
 		return int(n), err
@@ -434,3 +446,10 @@ func DialTimeoutWithTLS(network, address string, tlsConfig *tls.Config, timeout
 	}
 	}
 	return conn, nil
 	return conn, nil
 }
 }
+
+func deadlineOrTimeout(deadline time.Time, timeout time.Duration) time.Time {
+	if deadline.IsZero() {
+		return time.Now().Add(timeout)
+	}
+	return deadline
+}

+ 0 - 421
vendor/github.com/miekg/dns/client_test.go

@@ -1,421 +0,0 @@
-package dns
-
-import (
-	"crypto/tls"
-	"fmt"
-	"net"
-	"strconv"
-	"testing"
-	"time"
-)
-
-func TestClientSync(t *testing.T) {
-	HandleFunc("miek.nl.", HelloServer)
-	defer HandleRemove("miek.nl.")
-
-	s, addrstr, err := RunLocalUDPServer("127.0.0.1:0")
-	if err != nil {
-		t.Fatalf("unable to run test server: %v", err)
-	}
-	defer s.Shutdown()
-
-	m := new(Msg)
-	m.SetQuestion("miek.nl.", TypeSOA)
-
-	c := new(Client)
-	r, _, err := c.Exchange(m, addrstr)
-	if err != nil {
-		t.Errorf("failed to exchange: %v", err)
-	}
-	if r != nil && r.Rcode != RcodeSuccess {
-		t.Errorf("failed to get an valid answer\n%v", r)
-	}
-	// And now with plain Exchange().
-	r, err = Exchange(m, addrstr)
-	if err != nil {
-		t.Errorf("failed to exchange: %v", err)
-	}
-	if r == nil || r.Rcode != RcodeSuccess {
-		t.Errorf("failed to get an valid answer\n%v", r)
-	}
-}
-
-func TestClientTLSSync(t *testing.T) {
-	HandleFunc("miek.nl.", HelloServer)
-	defer HandleRemove("miek.nl.")
-
-	cert, err := tls.X509KeyPair(CertPEMBlock, KeyPEMBlock)
-	if err != nil {
-		t.Fatalf("unable to build certificate: %v", err)
-	}
-
-	config := tls.Config{
-		Certificates: []tls.Certificate{cert},
-	}
-
-	s, addrstr, err := RunLocalTLSServer("127.0.0.1:0", &config)
-	if err != nil {
-		t.Fatalf("unable to run test server: %v", err)
-	}
-	defer s.Shutdown()
-
-	m := new(Msg)
-	m.SetQuestion("miek.nl.", TypeSOA)
-
-	c := new(Client)
-	c.Net = "tcp-tls"
-	c.TLSConfig = &tls.Config{
-		InsecureSkipVerify: true,
-	}
-
-	r, _, err := c.Exchange(m, addrstr)
-	if err != nil {
-		t.Errorf("failed to exchange: %v", err)
-	}
-	if r != nil && r.Rcode != RcodeSuccess {
-		t.Errorf("failed to get an valid answer\n%v", r)
-	}
-}
-
-func TestClientSyncBadId(t *testing.T) {
-	HandleFunc("miek.nl.", HelloServerBadId)
-	defer HandleRemove("miek.nl.")
-
-	s, addrstr, err := RunLocalUDPServer("127.0.0.1:0")
-	if err != nil {
-		t.Fatalf("unable to run test server: %v", err)
-	}
-	defer s.Shutdown()
-
-	m := new(Msg)
-	m.SetQuestion("miek.nl.", TypeSOA)
-
-	c := new(Client)
-	if _, _, err := c.Exchange(m, addrstr); err != ErrId {
-		t.Errorf("did not find a bad Id")
-	}
-	// And now with plain Exchange().
-	if _, err := Exchange(m, addrstr); err != ErrId {
-		t.Errorf("did not find a bad Id")
-	}
-}
-
-func TestClientEDNS0(t *testing.T) {
-	HandleFunc("miek.nl.", HelloServer)
-	defer HandleRemove("miek.nl.")
-
-	s, addrstr, err := RunLocalUDPServer("127.0.0.1:0")
-	if err != nil {
-		t.Fatalf("unable to run test server: %v", err)
-	}
-	defer s.Shutdown()
-
-	m := new(Msg)
-	m.SetQuestion("miek.nl.", TypeDNSKEY)
-
-	m.SetEdns0(2048, true)
-
-	c := new(Client)
-	r, _, err := c.Exchange(m, addrstr)
-	if err != nil {
-		t.Errorf("failed to exchange: %v", err)
-	}
-
-	if r != nil && r.Rcode != RcodeSuccess {
-		t.Errorf("failed to get an valid answer\n%v", r)
-	}
-}
-
-// Validates the transmission and parsing of local EDNS0 options.
-func TestClientEDNS0Local(t *testing.T) {
-	optStr1 := "1979:0x0707"
-	optStr2 := strconv.Itoa(EDNS0LOCALSTART) + ":0x0601"
-
-	handler := func(w ResponseWriter, req *Msg) {
-		m := new(Msg)
-		m.SetReply(req)
-
-		m.Extra = make([]RR, 1, 2)
-		m.Extra[0] = &TXT{Hdr: RR_Header{Name: m.Question[0].Name, Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}, Txt: []string{"Hello local edns"}}
-
-		// If the local options are what we expect, then reflect them back.
-		ec1 := req.Extra[0].(*OPT).Option[0].(*EDNS0_LOCAL).String()
-		ec2 := req.Extra[0].(*OPT).Option[1].(*EDNS0_LOCAL).String()
-		if ec1 == optStr1 && ec2 == optStr2 {
-			m.Extra = append(m.Extra, req.Extra[0])
-		}
-
-		w.WriteMsg(m)
-	}
-
-	HandleFunc("miek.nl.", handler)
-	defer HandleRemove("miek.nl.")
-
-	s, addrstr, err := RunLocalUDPServer("127.0.0.1:0")
-	if err != nil {
-		t.Fatalf("unable to run test server: %s", err)
-	}
-	defer s.Shutdown()
-
-	m := new(Msg)
-	m.SetQuestion("miek.nl.", TypeTXT)
-
-	// Add two local edns options to the query.
-	ec1 := &EDNS0_LOCAL{Code: 1979, Data: []byte{7, 7}}
-	ec2 := &EDNS0_LOCAL{Code: EDNS0LOCALSTART, Data: []byte{6, 1}}
-	o := &OPT{Hdr: RR_Header{Name: ".", Rrtype: TypeOPT}, Option: []EDNS0{ec1, ec2}}
-	m.Extra = append(m.Extra, o)
-
-	c := new(Client)
-	r, _, e := c.Exchange(m, addrstr)
-	if e != nil {
-		t.Logf("failed to exchange: %s", e.Error())
-		t.Fail()
-	}
-
-	if r != nil && r.Rcode != RcodeSuccess {
-		t.Log("failed to get a valid answer")
-		t.Fail()
-		t.Logf("%v\n", r)
-	}
-
-	txt := r.Extra[0].(*TXT).Txt[0]
-	if txt != "Hello local edns" {
-		t.Log("Unexpected result for miek.nl", txt, "!= Hello local edns")
-		t.Fail()
-	}
-
-	// Validate the local options in the reply.
-	got := r.Extra[1].(*OPT).Option[0].(*EDNS0_LOCAL).String()
-	if got != optStr1 {
-		t.Logf("failed to get local edns0 answer; got %s, expected %s", got, optStr1)
-		t.Fail()
-		t.Logf("%v\n", r)
-	}
-
-	got = r.Extra[1].(*OPT).Option[1].(*EDNS0_LOCAL).String()
-	if got != optStr2 {
-		t.Logf("failed to get local edns0 answer; got %s, expected %s", got, optStr2)
-		t.Fail()
-		t.Logf("%v\n", r)
-	}
-}
-
-// ExampleTsigSecret_updateLeaseTSIG shows how to update a lease signed with TSIG
-func ExampleTsigSecret_updateLeaseTSIG() {
-	m := new(Msg)
-	m.SetUpdate("t.local.ip6.io.")
-	rr, _ := NewRR("t.local.ip6.io. 30 A 127.0.0.1")
-	rrs := make([]RR, 1)
-	rrs[0] = rr
-	m.Insert(rrs)
-
-	leaseRr := new(OPT)
-	leaseRr.Hdr.Name = "."
-	leaseRr.Hdr.Rrtype = TypeOPT
-	e := new(EDNS0_UL)
-	e.Code = EDNS0UL
-	e.Lease = 120
-	leaseRr.Option = append(leaseRr.Option, e)
-	m.Extra = append(m.Extra, leaseRr)
-
-	c := new(Client)
-	m.SetTsig("polvi.", HmacMD5, 300, time.Now().Unix())
-	c.TsigSecret = map[string]string{"polvi.": "pRZgBrBvI4NAHZYhxmhs/Q=="}
-
-	_, _, err := c.Exchange(m, "127.0.0.1:53")
-	if err != nil {
-		panic(err)
-	}
-}
-
-func TestClientConn(t *testing.T) {
-	HandleFunc("miek.nl.", HelloServer)
-	defer HandleRemove("miek.nl.")
-
-	// This uses TCP just to make it slightly different than TestClientSync
-	s, addrstr, err := RunLocalTCPServer("127.0.0.1:0")
-	if err != nil {
-		t.Fatalf("unable to run test server: %v", err)
-	}
-	defer s.Shutdown()
-
-	m := new(Msg)
-	m.SetQuestion("miek.nl.", TypeSOA)
-
-	cn, err := Dial("tcp", addrstr)
-	if err != nil {
-		t.Errorf("failed to dial %s: %v", addrstr, err)
-	}
-
-	err = cn.WriteMsg(m)
-	if err != nil {
-		t.Errorf("failed to exchange: %v", err)
-	}
-	r, err := cn.ReadMsg()
-	if r == nil || r.Rcode != RcodeSuccess {
-		t.Errorf("failed to get an valid answer\n%v", r)
-	}
-
-	err = cn.WriteMsg(m)
-	if err != nil {
-		t.Errorf("failed to exchange: %v", err)
-	}
-	h := new(Header)
-	buf, err := cn.ReadMsgHeader(h)
-	if buf == nil {
-		t.Errorf("failed to get an valid answer\n%v", r)
-	}
-	if int(h.Bits&0xF) != RcodeSuccess {
-		t.Errorf("failed to get an valid answer in ReadMsgHeader\n%v", r)
-	}
-	if h.Ancount != 0 || h.Qdcount != 1 || h.Nscount != 0 || h.Arcount != 1 {
-		t.Errorf("expected to have question and additional in response; got something else: %+v", h)
-	}
-	if err = r.Unpack(buf); err != nil {
-		t.Errorf("unable to unpack message fully: %v", err)
-	}
-}
-
-func TestTruncatedMsg(t *testing.T) {
-	m := new(Msg)
-	m.SetQuestion("miek.nl.", TypeSRV)
-	cnt := 10
-	for i := 0; i < cnt; i++ {
-		r := &SRV{
-			Hdr:    RR_Header{Name: m.Question[0].Name, Rrtype: TypeSRV, Class: ClassINET, Ttl: 0},
-			Port:   uint16(i + 8000),
-			Target: "target.miek.nl.",
-		}
-		m.Answer = append(m.Answer, r)
-
-		re := &A{
-			Hdr: RR_Header{Name: m.Question[0].Name, Rrtype: TypeA, Class: ClassINET, Ttl: 0},
-			A:   net.ParseIP(fmt.Sprintf("127.0.0.%d", i)).To4(),
-		}
-		m.Extra = append(m.Extra, re)
-	}
-	buf, err := m.Pack()
-	if err != nil {
-		t.Errorf("failed to pack: %v", err)
-	}
-
-	r := new(Msg)
-	if err = r.Unpack(buf); err != nil {
-		t.Errorf("unable to unpack message: %v", err)
-	}
-	if len(r.Answer) != cnt {
-		t.Logf("answer count after regular unpack doesn't match: %d", len(r.Answer))
-		t.Fail()
-	}
-	if len(r.Extra) != cnt {
-		t.Logf("extra count after regular unpack doesn't match: %d", len(r.Extra))
-		t.Fail()
-	}
-
-	m.Truncated = true
-	buf, err = m.Pack()
-	if err != nil {
-		t.Errorf("failed to pack truncated: %v", err)
-	}
-
-	r = new(Msg)
-	if err = r.Unpack(buf); err != nil && err != ErrTruncated {
-		t.Errorf("unable to unpack truncated message: %v", err)
-	}
-	if !r.Truncated {
-		t.Log("truncated message wasn't unpacked as truncated")
-		t.Fail()
-	}
-	if len(r.Answer) != cnt {
-		t.Logf("answer count after truncated unpack doesn't match: %d", len(r.Answer))
-		t.Fail()
-	}
-	if len(r.Extra) != cnt {
-		t.Logf("extra count after truncated unpack doesn't match: %d", len(r.Extra))
-		t.Fail()
-	}
-
-	// Now we want to remove almost all of the extra records
-	// We're going to loop over the extra to get the count of the size of all
-	// of them
-	off := 0
-	buf1 := make([]byte, m.Len())
-	for i := 0; i < len(m.Extra); i++ {
-		off, err = PackRR(m.Extra[i], buf1, off, nil, m.Compress)
-		if err != nil {
-			t.Errorf("failed to pack extra: %v", err)
-		}
-	}
-
-	// Remove all of the extra bytes but 10 bytes from the end of buf
-	off -= 10
-	buf1 = buf[:len(buf)-off]
-
-	r = new(Msg)
-	if err = r.Unpack(buf1); err != nil && err != ErrTruncated {
-		t.Errorf("unable to unpack cutoff message: %v", err)
-	}
-	if !r.Truncated {
-		t.Log("truncated cutoff message wasn't unpacked as truncated")
-		t.Fail()
-	}
-	if len(r.Answer) != cnt {
-		t.Logf("answer count after cutoff unpack doesn't match: %d", len(r.Answer))
-		t.Fail()
-	}
-	if len(r.Extra) != 0 {
-		t.Logf("extra count after cutoff unpack is not zero: %d", len(r.Extra))
-		t.Fail()
-	}
-
-	// Now we want to remove almost all of the answer records too
-	buf1 = make([]byte, m.Len())
-	as := 0
-	for i := 0; i < len(m.Extra); i++ {
-		off1 := off
-		off, err = PackRR(m.Extra[i], buf1, off, nil, m.Compress)
-		as = off - off1
-		if err != nil {
-			t.Errorf("failed to pack extra: %v", err)
-		}
-	}
-
-	// Keep exactly one answer left
-	// This should still cause Answer to be nil
-	off -= as
-	buf1 = buf[:len(buf)-off]
-
-	r = new(Msg)
-	if err = r.Unpack(buf1); err != nil && err != ErrTruncated {
-		t.Errorf("unable to unpack cutoff message: %v", err)
-	}
-	if !r.Truncated {
-		t.Log("truncated cutoff message wasn't unpacked as truncated")
-		t.Fail()
-	}
-	if len(r.Answer) != 0 {
-		t.Logf("answer count after second cutoff unpack is not zero: %d", len(r.Answer))
-		t.Fail()
-	}
-
-	// Now leave only 1 byte of the question
-	// Since the header is always 12 bytes, we just need to keep 13
-	buf1 = buf[:13]
-
-	r = new(Msg)
-	err = r.Unpack(buf1)
-	if err == nil || err == ErrTruncated {
-		t.Logf("error should not be ErrTruncated from question cutoff unpack: %v", err)
-		t.Fail()
-	}
-
-	// Finally, if we only have the header, we should still return an error
-	buf1 = buf[:12]
-
-	r = new(Msg)
-	if err = r.Unpack(buf1); err == nil || err != ErrTruncated {
-		t.Logf("error not ErrTruncated from header-only unpack: %v", err)
-		t.Fail()
-	}
-}

+ 0 - 50
vendor/github.com/miekg/dns/clientconfig_test.go

@@ -1,50 +0,0 @@
-package dns
-
-import (
-	"io/ioutil"
-	"os"
-	"path/filepath"
-	"testing"
-)
-
-const normal string = `
-# Comment
-domain somedomain.com
-nameserver 10.28.10.2
-nameserver 11.28.10.1
-`
-
-const missingNewline string = `
-domain somedomain.com
-nameserver 10.28.10.2
-nameserver 11.28.10.1` // <- NOTE: NO newline.
-
-func testConfig(t *testing.T, data string) {
-	tempDir, err := ioutil.TempDir("", "")
-	if err != nil {
-		t.Fatalf("tempDir: %v", err)
-	}
-	defer os.RemoveAll(tempDir)
-
-	path := filepath.Join(tempDir, "resolv.conf")
-	if err := ioutil.WriteFile(path, []byte(data), 0644); err != nil {
-		t.Fatalf("writeFile: %v", err)
-	}
-	cc, err := ClientConfigFromFile(path)
-	if err != nil {
-		t.Errorf("error parsing resolv.conf: %v", err)
-	}
-	if l := len(cc.Servers); l != 2 {
-		t.Errorf("incorrect number of nameservers detected: %d", l)
-	}
-	if l := len(cc.Search); l != 1 {
-		t.Errorf("domain directive not parsed correctly: %v", cc.Search)
-	} else {
-		if cc.Search[0] != "somedomain.com" {
-			t.Errorf("domain is unexpected: %v", cc.Search[0])
-		}
-	}
-}
-
-func TestNameserver(t *testing.T)          { testConfig(t, normal) }
-func TestMissingFinalNewLine(t *testing.T) { testConfig(t, missingNewline) }

+ 44 - 0
vendor/github.com/miekg/dns/dane.go

@@ -0,0 +1,44 @@
+package dns
+
+import (
+	"crypto/sha256"
+	"crypto/sha512"
+	"crypto/x509"
+	"encoding/hex"
+	"errors"
+	"io"
+)
+
+// CertificateToDANE converts a certificate to a hex string as used in the TLSA or SMIMEA records.
+func CertificateToDANE(selector, matchingType uint8, cert *x509.Certificate) (string, error) {
+	switch matchingType {
+	case 0:
+		switch selector {
+		case 0:
+			return hex.EncodeToString(cert.Raw), nil
+		case 1:
+			return hex.EncodeToString(cert.RawSubjectPublicKeyInfo), nil
+		}
+	case 1:
+		h := sha256.New()
+		switch selector {
+		case 0:
+			io.WriteString(h, string(cert.Raw))
+			return hex.EncodeToString(h.Sum(nil)), nil
+		case 1:
+			io.WriteString(h, string(cert.RawSubjectPublicKeyInfo))
+			return hex.EncodeToString(h.Sum(nil)), nil
+		}
+	case 2:
+		h := sha512.New()
+		switch selector {
+		case 0:
+			io.WriteString(h, string(cert.Raw))
+			return hex.EncodeToString(h.Sum(nil)), nil
+		case 1:
+			io.WriteString(h, string(cert.RawSubjectPublicKeyInfo))
+			return hex.EncodeToString(h.Sum(nil)), nil
+		}
+	}
+	return "", errors.New("dns: bad MatchingType or Selector")
+}

+ 9 - 5
vendor/github.com/miekg/dns/defaults.go

@@ -142,9 +142,13 @@ func (dns *Msg) IsTsig() *TSIG {
 // record in the additional section will do. It returns the OPT record
 // record in the additional section will do. It returns the OPT record
 // found or nil.
 // found or nil.
 func (dns *Msg) IsEdns0() *OPT {
 func (dns *Msg) IsEdns0() *OPT {
-	for _, r := range dns.Extra {
-		if r.Header().Rrtype == TypeOPT {
-			return r.(*OPT)
+	// EDNS0 is at the end of the additional section, start there.
+	// We might want to change this to *only* look at the last two
+	// records. So we see TSIG and/or OPT - this a slightly bigger
+	// change though.
+	for i := len(dns.Extra) - 1; i >= 0; i-- {
+		if dns.Extra[i].Header().Rrtype == TypeOPT {
+			return dns.Extra[i].(*OPT)
 		}
 		}
 	}
 	}
 	return nil
 	return nil
@@ -163,8 +167,8 @@ func IsDomainName(s string) (labels int, ok bool) {
 	return labels, err == nil
 	return labels, err == nil
 }
 }
 
 
-// IsSubDomain checks if child is indeed a child of the parent. Both child and
-// parent are *not* downcased before doing the comparison.
+// IsSubDomain checks if child is indeed a child of the parent. If child and parent
+// are the same domain true is returned as well.
 func IsSubDomain(parent, child string) bool {
 func IsSubDomain(parent, child string) bool {
 	// Entire child is contained in parent
 	// Entire child is contained in parent
 	return CompareDomainName(parent, child) == CountLabel(parent)
 	return CompareDomainName(parent, child) == CountLabel(parent)

+ 21 - 17
vendor/github.com/miekg/dns/dns.go

@@ -3,17 +3,15 @@ package dns
 import "strconv"
 import "strconv"
 
 
 const (
 const (
-	year68 = 1 << 31 // For RFC1982 (Serial Arithmetic) calculations in 32 bits.
-	// DefaultMsgSize is the standard default for messages larger than 512 bytes.
-	DefaultMsgSize = 4096
-	// MinMsgSize is the minimal size of a DNS packet.
-	MinMsgSize = 512
-	// MaxMsgSize is the largest possible DNS packet.
-	MaxMsgSize = 65535
-	defaultTtl = 3600 // Default internal TTL.
+	year68     = 1 << 31 // For RFC1982 (Serial Arithmetic) calculations in 32 bits.
+	defaultTtl = 3600    // Default internal TTL.
+
+	DefaultMsgSize = 4096  // DefaultMsgSize is the standard default for messages larger than 512 bytes.
+	MinMsgSize     = 512   // MinMsgSize is the minimal size of a DNS packet.
+	MaxMsgSize     = 65535 // MaxMsgSize is the largest possible DNS packet.
 )
 )
 
 
-// Error represents a DNS error
+// Error represents a DNS error.
 type Error struct{ err string }
 type Error struct{ err string }
 
 
 func (e *Error) Error() string {
 func (e *Error) Error() string {
@@ -30,10 +28,13 @@ type RR interface {
 	Header() *RR_Header
 	Header() *RR_Header
 	// String returns the text representation of the resource record.
 	// String returns the text representation of the resource record.
 	String() string
 	String() string
+
 	// copy returns a copy of the RR
 	// copy returns a copy of the RR
 	copy() RR
 	copy() RR
 	// len returns the length (in octets) of the uncompressed RR in wire format.
 	// len returns the length (in octets) of the uncompressed RR in wire format.
 	len() int
 	len() int
+	// pack packs an RR into wire format.
+	pack([]byte, int, map[string]int, bool) (int, error)
 }
 }
 
 
 // RR_Header is the header all DNS resource records share.
 // RR_Header is the header all DNS resource records share.
@@ -42,13 +43,13 @@ type RR_Header struct {
 	Rrtype   uint16
 	Rrtype   uint16
 	Class    uint16
 	Class    uint16
 	Ttl      uint32
 	Ttl      uint32
-	Rdlength uint16 // length of data after header
+	Rdlength uint16 // Length of data after header.
 }
 }
 
 
-// Header returns itself. This is here to make RR_Header implement the RR interface.
+// Header returns itself. This is here to make RR_Header implements the RR interface.
 func (h *RR_Header) Header() *RR_Header { return h }
 func (h *RR_Header) Header() *RR_Header { return h }
 
 
-// Just to imlement the RR interface.
+// Just to implement the RR interface.
 func (h *RR_Header) copy() RR { return nil }
 func (h *RR_Header) copy() RR { return nil }
 
 
 func (h *RR_Header) copyHeader() *RR_Header {
 func (h *RR_Header) copyHeader() *RR_Header {
@@ -82,19 +83,22 @@ func (h *RR_Header) len() int {
 	return l
 	return l
 }
 }
 
 
-// ToRFC3597 converts a known RR to the unknown RR representation
-// from RFC 3597.
+// ToRFC3597 converts a known RR to the unknown RR representation from RFC 3597.
 func (rr *RFC3597) ToRFC3597(r RR) error {
 func (rr *RFC3597) ToRFC3597(r RR) error {
 	buf := make([]byte, r.len()*2)
 	buf := make([]byte, r.len()*2)
-	off, err := PackStruct(r, buf, 0)
+	off, err := PackRR(r, buf, 0, nil, false)
 	if err != nil {
 	if err != nil {
 		return err
 		return err
 	}
 	}
 	buf = buf[:off]
 	buf = buf[:off]
-	rawSetRdlength(buf, 0, off)
-	_, err = UnpackStruct(rr, buf, 0)
+	if int(r.Header().Rdlength) > off {
+		return ErrBuf
+	}
+
+	rfc3597, _, err := unpackRFC3597(*r.Header(), buf, off-int(r.Header().Rdlength))
 	if err != nil {
 	if err != nil {
 		return err
 		return err
 	}
 	}
+	*rr = *rfc3597.(*RFC3597)
 	return nil
 	return nil
 }
 }

+ 0 - 578
vendor/github.com/miekg/dns/dns_test.go

@@ -1,578 +0,0 @@
-package dns
-
-import (
-	"encoding/hex"
-	"net"
-	"testing"
-)
-
-func TestPackUnpack(t *testing.T) {
-	out := new(Msg)
-	out.Answer = make([]RR, 1)
-	key := new(DNSKEY)
-	key = &DNSKEY{Flags: 257, Protocol: 3, Algorithm: RSASHA1}
-	key.Hdr = RR_Header{Name: "miek.nl.", Rrtype: TypeDNSKEY, Class: ClassINET, Ttl: 3600}
-	key.PublicKey = "AwEAAaHIwpx3w4VHKi6i1LHnTaWeHCL154Jug0Rtc9ji5qwPXpBo6A5sRv7cSsPQKPIwxLpyCrbJ4mr2L0EPOdvP6z6YfljK2ZmTbogU9aSU2fiq/4wjxbdkLyoDVgtO+JsxNN4bjr4WcWhsmk1Hg93FV9ZpkWb0Tbad8DFqNDzr//kZ"
-
-	out.Answer[0] = key
-	msg, err := out.Pack()
-	if err != nil {
-		t.Error("failed to pack msg with DNSKEY")
-	}
-	in := new(Msg)
-	if in.Unpack(msg) != nil {
-		t.Error("failed to unpack msg with DNSKEY")
-	}
-
-	sig := new(RRSIG)
-	sig = &RRSIG{TypeCovered: TypeDNSKEY, Algorithm: RSASHA1, Labels: 2,
-		OrigTtl: 3600, Expiration: 4000, Inception: 4000, KeyTag: 34641, SignerName: "miek.nl.",
-		Signature: "AwEAAaHIwpx3w4VHKi6i1LHnTaWeHCL154Jug0Rtc9ji5qwPXpBo6A5sRv7cSsPQKPIwxLpyCrbJ4mr2L0EPOdvP6z6YfljK2ZmTbogU9aSU2fiq/4wjxbdkLyoDVgtO+JsxNN4bjr4WcWhsmk1Hg93FV9ZpkWb0Tbad8DFqNDzr//kZ"}
-	sig.Hdr = RR_Header{Name: "miek.nl.", Rrtype: TypeRRSIG, Class: ClassINET, Ttl: 3600}
-
-	out.Answer[0] = sig
-	msg, err = out.Pack()
-	if err != nil {
-		t.Error("failed to pack msg with RRSIG")
-	}
-
-	if in.Unpack(msg) != nil {
-		t.Error("failed to unpack msg with RRSIG")
-	}
-}
-
-func TestPackUnpack2(t *testing.T) {
-	m := new(Msg)
-	m.Extra = make([]RR, 1)
-	m.Answer = make([]RR, 1)
-	dom := "miek.nl."
-	rr := new(A)
-	rr.Hdr = RR_Header{Name: dom, Rrtype: TypeA, Class: ClassINET, Ttl: 0}
-	rr.A = net.IPv4(127, 0, 0, 1)
-
-	x := new(TXT)
-	x.Hdr = RR_Header{Name: dom, Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}
-	x.Txt = []string{"heelalaollo"}
-
-	m.Extra[0] = x
-	m.Answer[0] = rr
-	_, err := m.Pack()
-	if err != nil {
-		t.Error("Packing failed: ", err)
-		return
-	}
-}
-
-func TestPackUnpack3(t *testing.T) {
-	m := new(Msg)
-	m.Extra = make([]RR, 2)
-	m.Answer = make([]RR, 1)
-	dom := "miek.nl."
-	rr := new(A)
-	rr.Hdr = RR_Header{Name: dom, Rrtype: TypeA, Class: ClassINET, Ttl: 0}
-	rr.A = net.IPv4(127, 0, 0, 1)
-
-	x1 := new(TXT)
-	x1.Hdr = RR_Header{Name: dom, Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}
-	x1.Txt = []string{}
-
-	x2 := new(TXT)
-	x2.Hdr = RR_Header{Name: dom, Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}
-	x2.Txt = []string{"heelalaollo"}
-
-	m.Extra[0] = x1
-	m.Extra[1] = x2
-	m.Answer[0] = rr
-	b, err := m.Pack()
-	if err != nil {
-		t.Error("packing failed: ", err)
-		return
-	}
-
-	var unpackMsg Msg
-	err = unpackMsg.Unpack(b)
-	if err != nil {
-		t.Error("unpacking failed")
-		return
-	}
-}
-
-func TestBailiwick(t *testing.T) {
-	yes := map[string]string{
-		"miek.nl": "ns.miek.nl",
-		".":       "miek.nl",
-	}
-	for parent, child := range yes {
-		if !IsSubDomain(parent, child) {
-			t.Errorf("%s should be child of %s", child, parent)
-			t.Errorf("comparelabels %d", CompareDomainName(parent, child))
-			t.Errorf("lenlabels %d %d", CountLabel(parent), CountLabel(child))
-		}
-	}
-	no := map[string]string{
-		"www.miek.nl":  "ns.miek.nl",
-		"m\\.iek.nl":   "ns.miek.nl",
-		"w\\.iek.nl":   "w.iek.nl",
-		"p\\\\.iek.nl": "ns.p.iek.nl", // p\\.iek.nl , literal \ in domain name
-		"miek.nl":      ".",
-	}
-	for parent, child := range no {
-		if IsSubDomain(parent, child) {
-			t.Errorf("%s should not be child of %s", child, parent)
-			t.Errorf("comparelabels %d", CompareDomainName(parent, child))
-			t.Errorf("lenlabels %d %d", CountLabel(parent), CountLabel(child))
-		}
-	}
-}
-
-func TestPack(t *testing.T) {
-	rr := []string{"US.    86400	IN	NSEC	0-.us. NS SOA RRSIG NSEC DNSKEY TYPE65534"}
-	m := new(Msg)
-	var err error
-	m.Answer = make([]RR, 1)
-	for _, r := range rr {
-		m.Answer[0], err = NewRR(r)
-		if err != nil {
-			t.Errorf("failed to create RR: %v", err)
-			continue
-		}
-		if _, err := m.Pack(); err != nil {
-			t.Errorf("packing failed: %v", err)
-		}
-	}
-	x := new(Msg)
-	ns, _ := NewRR("pool.ntp.org.   390 IN  NS  a.ntpns.org")
-	ns.(*NS).Ns = "a.ntpns.org"
-	x.Ns = append(m.Ns, ns)
-	x.Ns = append(m.Ns, ns)
-	x.Ns = append(m.Ns, ns)
-	// This crashes due to the fact the a.ntpns.org isn't a FQDN
-	// How to recover() from a remove panic()?
-	if _, err := x.Pack(); err == nil {
-		t.Error("packing should fail")
-	}
-	x.Answer = make([]RR, 1)
-	x.Answer[0], err = NewRR(rr[0])
-	if _, err := x.Pack(); err == nil {
-		t.Error("packing should fail")
-	}
-	x.Question = make([]Question, 1)
-	x.Question[0] = Question{";sd#edddds鍛↙赏‘℅∥↙xzztsestxssweewwsssstx@s@Z嵌[email protected].", TypeA, ClassINET}
-	if _, err := x.Pack(); err == nil {
-		t.Error("packing should fail")
-	}
-}
-
-func TestPackNAPTR(t *testing.T) {
-	for _, n := range []string{
-		`apple.com. IN NAPTR   100 50 "se" "SIP+D2U" "" _sip._udp.apple.com.`,
-		`apple.com. IN NAPTR   90 50 "se" "SIP+D2T" "" _sip._tcp.apple.com.`,
-		`apple.com. IN NAPTR   50 50 "se" "SIPS+D2T" "" _sips._tcp.apple.com.`,
-	} {
-		rr, _ := NewRR(n)
-		msg := make([]byte, rr.len())
-		if off, err := PackRR(rr, msg, 0, nil, false); err != nil {
-			t.Errorf("packing failed: %v", err)
-			t.Errorf("length %d, need more than %d", rr.len(), off)
-		} else {
-			t.Logf("buf size needed: %d", off)
-		}
-	}
-}
-
-func TestCompressLength(t *testing.T) {
-	m := new(Msg)
-	m.SetQuestion("miek.nl", TypeMX)
-	ul := m.Len()
-	m.Compress = true
-	if ul != m.Len() {
-		t.Fatalf("should be equal")
-	}
-}
-
-// Does the predicted length match final packed length?
-func TestMsgCompressLength(t *testing.T) {
-	makeMsg := func(question string, ans, ns, e []RR) *Msg {
-		msg := new(Msg)
-		msg.SetQuestion(Fqdn(question), TypeANY)
-		msg.Answer = append(msg.Answer, ans...)
-		msg.Ns = append(msg.Ns, ns...)
-		msg.Extra = append(msg.Extra, e...)
-		msg.Compress = true
-		return msg
-	}
-
-	name1 := "12345678901234567890123456789012345.12345678.123."
-	rrA, _ := NewRR(name1 + " 3600 IN A 192.0.2.1")
-	rrMx, _ := NewRR(name1 + " 3600 IN MX 10 " + name1)
-	tests := []*Msg{
-		makeMsg(name1, []RR{rrA}, nil, nil),
-		makeMsg(name1, []RR{rrMx, rrMx}, nil, nil)}
-
-	for _, msg := range tests {
-		predicted := msg.Len()
-		buf, err := msg.Pack()
-		if err != nil {
-			t.Error(err)
-		}
-		if predicted < len(buf) {
-			t.Errorf("predicted compressed length is wrong: predicted %s (len=%d) %d, actual %d",
-				msg.Question[0].Name, len(msg.Answer), predicted, len(buf))
-		}
-	}
-}
-
-func TestMsgLength(t *testing.T) {
-	makeMsg := func(question string, ans, ns, e []RR) *Msg {
-		msg := new(Msg)
-		msg.SetQuestion(Fqdn(question), TypeANY)
-		msg.Answer = append(msg.Answer, ans...)
-		msg.Ns = append(msg.Ns, ns...)
-		msg.Extra = append(msg.Extra, e...)
-		return msg
-	}
-
-	name1 := "12345678901234567890123456789012345.12345678.123."
-	rrA, _ := NewRR(name1 + " 3600 IN A 192.0.2.1")
-	rrMx, _ := NewRR(name1 + " 3600 IN MX 10 " + name1)
-	tests := []*Msg{
-		makeMsg(name1, []RR{rrA}, nil, nil),
-		makeMsg(name1, []RR{rrMx, rrMx}, nil, nil)}
-
-	for _, msg := range tests {
-		predicted := msg.Len()
-		buf, err := msg.Pack()
-		if err != nil {
-			t.Error(err)
-		}
-		if predicted < len(buf) {
-			t.Errorf("predicted length is wrong: predicted %s (len=%d), actual %d",
-				msg.Question[0].Name, predicted, len(buf))
-		}
-	}
-}
-
-func TestMsgLength2(t *testing.T) {
-	// Serialized replies
-	var testMessages = []string{
-		// google.com. IN A?
-		"064e81800001000b0004000506676f6f676c6503636f6d0000010001c00c00010001000000050004adc22986c00c00010001000000050004adc22987c00c00010001000000050004adc22988c00c00010001000000050004adc22989c00c00010001000000050004adc2298ec00c00010001000000050004adc22980c00c00010001000000050004adc22981c00c00010001000000050004adc22982c00c00010001000000050004adc22983c00c00010001000000050004adc22984c00c00010001000000050004adc22985c00c00020001000000050006036e7331c00cc00c00020001000000050006036e7332c00cc00c00020001000000050006036e7333c00cc00c00020001000000050006036e7334c00cc0d800010001000000050004d8ef200ac0ea00010001000000050004d8ef220ac0fc00010001000000050004d8ef240ac10e00010001000000050004d8ef260a0000290500000000050000",
-		// amazon.com. IN A? (reply has no EDNS0 record)
-		// TODO(miek): this one is off-by-one, need to find out why
-		//"6de1818000010004000a000806616d617a6f6e03636f6d0000010001c00c000100010000000500044815c2d4c00c000100010000000500044815d7e8c00c00010001000000050004b02062a6c00c00010001000000050004cdfbf236c00c000200010000000500140570646e733408756c747261646e73036f726700c00c000200010000000500150570646e733508756c747261646e7304696e666f00c00c000200010000000500160570646e733608756c747261646e7302636f02756b00c00c00020001000000050014036e7331037033310664796e656374036e657400c00c00020001000000050006036e7332c0cfc00c00020001000000050006036e7333c0cfc00c00020001000000050006036e7334c0cfc00c000200010000000500110570646e733108756c747261646e73c0dac00c000200010000000500080570646e7332c127c00c000200010000000500080570646e7333c06ec0cb00010001000000050004d04e461fc0eb00010001000000050004cc0dfa1fc0fd00010001000000050004d04e471fc10f00010001000000050004cc0dfb1fc12100010001000000050004cc4a6c01c121001c000100000005001020010502f3ff00000000000000000001c13e00010001000000050004cc4a6d01c13e001c0001000000050010261000a1101400000000000000000001",
-		// yahoo.com. IN A?
-		"fc2d81800001000300070008057961686f6f03636f6d0000010001c00c00010001000000050004628afd6dc00c00010001000000050004628bb718c00c00010001000000050004cebe242dc00c00020001000000050006036e7336c00cc00c00020001000000050006036e7338c00cc00c00020001000000050006036e7331c00cc00c00020001000000050006036e7332c00cc00c00020001000000050006036e7333c00cc00c00020001000000050006036e7334c00cc00c00020001000000050006036e7335c00cc07b0001000100000005000444b48310c08d00010001000000050004448eff10c09f00010001000000050004cb54dd35c0b100010001000000050004628a0b9dc0c30001000100000005000477a0f77cc05700010001000000050004ca2bdfaac06900010001000000050004caa568160000290500000000050000",
-		// microsoft.com. IN A?
-		"f4368180000100020005000b096d6963726f736f667403636f6d0000010001c00c0001000100000005000440040b25c00c0001000100000005000441373ac9c00c0002000100000005000e036e7331046d736674036e657400c00c00020001000000050006036e7332c04fc00c00020001000000050006036e7333c04fc00c00020001000000050006036e7334c04fc00c00020001000000050006036e7335c04fc04b000100010000000500044137253ec04b001c00010000000500102a010111200500000000000000010001c0650001000100000005000440043badc065001c00010000000500102a010111200600060000000000010001c07700010001000000050004d5c7b435c077001c00010000000500102a010111202000000000000000010001c08900010001000000050004cf2e4bfec089001c00010000000500102404f800200300000000000000010001c09b000100010000000500044137e28cc09b001c00010000000500102a010111200f000100000000000100010000290500000000050000",
-		// google.com. IN MX?
-		"724b8180000100050004000b06676f6f676c6503636f6d00000f0001c00c000f000100000005000c000a056173706d78016cc00cc00c000f0001000000050009001404616c7431c02ac00c000f0001000000050009001e04616c7432c02ac00c000f0001000000050009002804616c7433c02ac00c000f0001000000050009003204616c7434c02ac00c00020001000000050006036e7332c00cc00c00020001000000050006036e7333c00cc00c00020001000000050006036e7334c00cc00c00020001000000050006036e7331c00cc02a00010001000000050004adc2421bc02a001c00010000000500102a00145040080c01000000000000001bc04200010001000000050004adc2461bc05700010001000000050004adc2451bc06c000100010000000500044a7d8f1bc081000100010000000500044a7d191bc0ca00010001000000050004d8ef200ac09400010001000000050004d8ef220ac0a600010001000000050004d8ef240ac0b800010001000000050004d8ef260a0000290500000000050000",
-		// reddit.com. IN A?
-		"12b98180000100080000000c0672656464697403636f6d0000020001c00c0002000100000005000f046175733204616b616d036e657400c00c000200010000000500070475736534c02dc00c000200010000000500070475737733c02dc00c000200010000000500070475737735c02dc00c00020001000000050008056173696131c02dc00c00020001000000050008056173696139c02dc00c00020001000000050008056e73312d31c02dc00c0002000100000005000a076e73312d313935c02dc02800010001000000050004c30a242ec04300010001000000050004451f1d39c05600010001000000050004451f3bc7c0690001000100000005000460073240c07c000100010000000500046007fb81c090000100010000000500047c283484c090001c00010000000500102a0226f0006700000000000000000064c0a400010001000000050004c16c5b01c0a4001c000100000005001026001401000200000000000000000001c0b800010001000000050004c16c5bc3c0b8001c0001000000050010260014010002000000000000000000c30000290500000000050000",
-	}
-
-	for i, hexData := range testMessages {
-		// we won't fail the decoding of the hex
-		input, _ := hex.DecodeString(hexData)
-		m := new(Msg)
-		m.Unpack(input)
-		//println(m.String())
-		m.Compress = true
-		lenComp := m.Len()
-		b, _ := m.Pack()
-		pacComp := len(b)
-		m.Compress = false
-		lenUnComp := m.Len()
-		b, _ = m.Pack()
-		pacUnComp := len(b)
-		if pacComp+1 != lenComp {
-			t.Errorf("msg.Len(compressed)=%d actual=%d for test %d", lenComp, pacComp, i)
-		}
-		if pacUnComp+1 != lenUnComp {
-			t.Errorf("msg.Len(uncompressed)=%d actual=%d for test %d", lenUnComp, pacUnComp, i)
-		}
-	}
-}
-
-func TestMsgLengthCompressionMalformed(t *testing.T) {
-	// SOA with empty hostmaster, which is illegal
-	soa := &SOA{Hdr: RR_Header{Name: ".", Rrtype: TypeSOA, Class: ClassINET, Ttl: 12345},
-		Ns:      ".",
-		Mbox:    "",
-		Serial:  0,
-		Refresh: 28800,
-		Retry:   7200,
-		Expire:  604800,
-		Minttl:  60}
-	m := new(Msg)
-	m.Compress = true
-	m.Ns = []RR{soa}
-	m.Len() // Should not crash.
-}
-
-func BenchmarkMsgLength(b *testing.B) {
-	b.StopTimer()
-	makeMsg := func(question string, ans, ns, e []RR) *Msg {
-		msg := new(Msg)
-		msg.SetQuestion(Fqdn(question), TypeANY)
-		msg.Answer = append(msg.Answer, ans...)
-		msg.Ns = append(msg.Ns, ns...)
-		msg.Extra = append(msg.Extra, e...)
-		msg.Compress = true
-		return msg
-	}
-	name1 := "12345678901234567890123456789012345.12345678.123."
-	rrMx, _ := NewRR(name1 + " 3600 IN MX 10 " + name1)
-	msg := makeMsg(name1, []RR{rrMx, rrMx}, nil, nil)
-	b.StartTimer()
-	for i := 0; i < b.N; i++ {
-		msg.Len()
-	}
-}
-
-func BenchmarkMsgLengthPack(b *testing.B) {
-	makeMsg := func(question string, ans, ns, e []RR) *Msg {
-		msg := new(Msg)
-		msg.SetQuestion(Fqdn(question), TypeANY)
-		msg.Answer = append(msg.Answer, ans...)
-		msg.Ns = append(msg.Ns, ns...)
-		msg.Extra = append(msg.Extra, e...)
-		msg.Compress = true
-		return msg
-	}
-	name1 := "12345678901234567890123456789012345.12345678.123."
-	rrMx, _ := NewRR(name1 + " 3600 IN MX 10 " + name1)
-	msg := makeMsg(name1, []RR{rrMx, rrMx}, nil, nil)
-	b.ResetTimer()
-	for i := 0; i < b.N; i++ {
-		_, _ = msg.Pack()
-	}
-}
-
-func BenchmarkMsgPackBuffer(b *testing.B) {
-	makeMsg := func(question string, ans, ns, e []RR) *Msg {
-		msg := new(Msg)
-		msg.SetQuestion(Fqdn(question), TypeANY)
-		msg.Answer = append(msg.Answer, ans...)
-		msg.Ns = append(msg.Ns, ns...)
-		msg.Extra = append(msg.Extra, e...)
-		msg.Compress = true
-		return msg
-	}
-	name1 := "12345678901234567890123456789012345.12345678.123."
-	rrMx, _ := NewRR(name1 + " 3600 IN MX 10 " + name1)
-	msg := makeMsg(name1, []RR{rrMx, rrMx}, nil, nil)
-	buf := make([]byte, 512)
-	b.ResetTimer()
-	for i := 0; i < b.N; i++ {
-		_, _ = msg.PackBuffer(buf)
-	}
-}
-
-func BenchmarkMsgUnpack(b *testing.B) {
-	makeMsg := func(question string, ans, ns, e []RR) *Msg {
-		msg := new(Msg)
-		msg.SetQuestion(Fqdn(question), TypeANY)
-		msg.Answer = append(msg.Answer, ans...)
-		msg.Ns = append(msg.Ns, ns...)
-		msg.Extra = append(msg.Extra, e...)
-		msg.Compress = true
-		return msg
-	}
-	name1 := "12345678901234567890123456789012345.12345678.123."
-	rrMx, _ := NewRR(name1 + " 3600 IN MX 10 " + name1)
-	msg := makeMsg(name1, []RR{rrMx, rrMx}, nil, nil)
-	msgBuf, _ := msg.Pack()
-	b.ResetTimer()
-	for i := 0; i < b.N; i++ {
-		_ = msg.Unpack(msgBuf)
-	}
-}
-
-func BenchmarkPackDomainName(b *testing.B) {
-	name1 := "12345678901234567890123456789012345.12345678.123."
-	buf := make([]byte, len(name1)+1)
-	b.ResetTimer()
-	for i := 0; i < b.N; i++ {
-		_, _ = PackDomainName(name1, buf, 0, nil, false)
-	}
-}
-
-func BenchmarkUnpackDomainName(b *testing.B) {
-	name1 := "12345678901234567890123456789012345.12345678.123."
-	buf := make([]byte, len(name1)+1)
-	_, _ = PackDomainName(name1, buf, 0, nil, false)
-	b.ResetTimer()
-	for i := 0; i < b.N; i++ {
-		_, _, _ = UnpackDomainName(buf, 0)
-	}
-}
-
-func BenchmarkUnpackDomainNameUnprintable(b *testing.B) {
-	name1 := "\x02\x02\x02\x025\x02\x02\x02\x02.12345678.123."
-	buf := make([]byte, len(name1)+1)
-	_, _ = PackDomainName(name1, buf, 0, nil, false)
-	b.ResetTimer()
-	for i := 0; i < b.N; i++ {
-		_, _, _ = UnpackDomainName(buf, 0)
-	}
-}
-
-func TestToRFC3597(t *testing.T) {
-	a, _ := NewRR("miek.nl. IN A 10.0.1.1")
-	x := new(RFC3597)
-	x.ToRFC3597(a)
-	if x.String() != `miek.nl.	3600	CLASS1	TYPE1	\# 4 0a000101` {
-		t.Error("string mismatch")
-	}
-}
-
-func TestNoRdataPack(t *testing.T) {
-	data := make([]byte, 1024)
-	for typ, fn := range TypeToRR {
-		r := fn()
-		*r.Header() = RR_Header{Name: "miek.nl.", Rrtype: typ, Class: ClassINET, Ttl: 3600}
-		_, err := PackRR(r, data, 0, nil, false)
-		if err != nil {
-			t.Errorf("failed to pack RR with zero rdata: %s: %v", TypeToString[typ], err)
-		}
-	}
-}
-
-// TODO(miek): fix dns buffer too small errors this throws
-func TestNoRdataUnpack(t *testing.T) {
-	data := make([]byte, 1024)
-	for typ, fn := range TypeToRR {
-		if typ == TypeSOA || typ == TypeTSIG || typ == TypeWKS {
-			// SOA, TSIG will not be seen (like this) in dyn. updates?
-			// WKS is an bug, but...deprecated record.
-			continue
-		}
-		r := fn()
-		*r.Header() = RR_Header{Name: "miek.nl.", Rrtype: typ, Class: ClassINET, Ttl: 3600}
-		off, err := PackRR(r, data, 0, nil, false)
-		if err != nil {
-			// Should always works, TestNoDataPack should have caught this
-			t.Errorf("failed to pack RR: %v", err)
-			continue
-		}
-		rr, _, err := UnpackRR(data[:off], 0)
-		if err != nil {
-			t.Errorf("failed to unpack RR with zero rdata: %s: %v", TypeToString[typ], err)
-		}
-		t.Log(rr)
-	}
-}
-
-func TestRdataOverflow(t *testing.T) {
-	rr := new(RFC3597)
-	rr.Hdr.Name = "."
-	rr.Hdr.Class = ClassINET
-	rr.Hdr.Rrtype = 65280
-	rr.Rdata = hex.EncodeToString(make([]byte, 0xFFFF))
-	buf := make([]byte, 0xFFFF*2)
-	if _, err := PackRR(rr, buf, 0, nil, false); err != nil {
-		t.Fatalf("maximum size rrdata pack failed: %v", err)
-	}
-	rr.Rdata += "00"
-	if _, err := PackRR(rr, buf, 0, nil, false); err != ErrRdata {
-		t.Fatalf("oversize rrdata pack didn't return ErrRdata - instead: %v", err)
-	}
-}
-
-func TestCopy(t *testing.T) {
-	rr, _ := NewRR("miek.nl. 2311 IN A 127.0.0.1") // Weird TTL to avoid catching TTL
-	rr1 := Copy(rr)
-	if rr.String() != rr1.String() {
-		t.Fatalf("Copy() failed %s != %s", rr.String(), rr1.String())
-	}
-}
-
-func TestMsgCopy(t *testing.T) {
-	m := new(Msg)
-	m.SetQuestion("miek.nl.", TypeA)
-	rr, _ := NewRR("miek.nl. 2311 IN A 127.0.0.1")
-	m.Answer = []RR{rr}
-	rr, _ = NewRR("miek.nl. 2311 IN NS 127.0.0.1")
-	m.Ns = []RR{rr}
-
-	m1 := m.Copy()
-	if m.String() != m1.String() {
-		t.Fatalf("Msg.Copy() failed %s != %s", m.String(), m1.String())
-	}
-
-	m1.Answer[0], _ = NewRR("somethingelse.nl. 2311 IN A 127.0.0.1")
-	if m.String() == m1.String() {
-		t.Fatalf("Msg.Copy() failed; change to copy changed template %s", m.String())
-	}
-
-	rr, _ = NewRR("miek.nl. 2311 IN A 127.0.0.2")
-	m1.Answer = append(m1.Answer, rr)
-	if m1.Ns[0].String() == m1.Answer[1].String() {
-		t.Fatalf("Msg.Copy() failed; append changed underlying array %s", m1.Ns[0].String())
-	}
-}
-
-func BenchmarkCopy(b *testing.B) {
-	b.ReportAllocs()
-	m := new(Msg)
-	m.SetQuestion("miek.nl.", TypeA)
-	rr, _ := NewRR("miek.nl. 2311 IN A 127.0.0.1")
-	m.Answer = []RR{rr}
-	rr, _ = NewRR("miek.nl. 2311 IN NS 127.0.0.1")
-	m.Ns = []RR{rr}
-	rr, _ = NewRR("miek.nl. 2311 IN A 127.0.0.1")
-	m.Extra = []RR{rr}
-
-	b.ResetTimer()
-	for i := 0; i < b.N; i++ {
-		m.Copy()
-	}
-}
-
-func TestPackIPSECKEY(t *testing.T) {
-	tests := []string{
-		"38.2.0.192.in-addr.arpa. 7200 IN     IPSECKEY ( 10 1 2 192.0.2.38 AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== )",
-		"38.2.0.192.in-addr.arpa. 7200 IN     IPSECKEY ( 10 0 2 .  AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== )",
-		"38.2.0.192.in-addr.arpa. 7200 IN     IPSECKEY ( 10 1 2 192.0.2.3 AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== )",
-		"38.1.0.192.in-addr.arpa. 7200 IN     IPSECKEY ( 10 3 2 mygateway.example.com.  AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== )",
-		"0.d.4.0.3.0.e.f.f.f.3.f.0.1.2.0 7200 IN     IPSECKEY ( 10 2 2 2001:0DB8:0:8002::2000:1 AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== )",
-	}
-	buf := make([]byte, 1024)
-	for _, t1 := range tests {
-		rr, _ := NewRR(t1)
-		off, err := PackRR(rr, buf, 0, nil, false)
-		if err != nil {
-			t.Errorf("failed to pack IPSECKEY %v: %s", err, t1)
-			continue
-		}
-
-		rr, _, err = UnpackRR(buf[:off], 0)
-		if err != nil {
-			t.Errorf("failed to unpack IPSECKEY %v: %s", err, t1)
-		}
-		t.Log(rr)
-	}
-}
-
-func TestMsgPackBuffer(t *testing.T) {
-	var testMessages = []string{
-		// news.ycombinator.com.in.escapemg.com.	IN	A, response
-		"586285830001000000010000046e6577730b79636f6d62696e61746f7203636f6d02696e086573636170656d6703636f6d0000010001c0210006000100000e10002c036e7332c02103646e730b67726f6f7665736861726bc02d77ed50e600002a3000000e1000093a8000000e10",
-
-		// news.ycombinator.com.in.escapemg.com.	IN	A, question
-		"586201000001000000000000046e6577730b79636f6d62696e61746f7203636f6d02696e086573636170656d6703636f6d0000010001",
-
-		"398781020001000000000000046e6577730b79636f6d62696e61746f7203636f6d0000010001",
-	}
-
-	for i, hexData := range testMessages {
-		// we won't fail the decoding of the hex
-		input, _ := hex.DecodeString(hexData)
-		m := new(Msg)
-		if err := m.Unpack(input); err != nil {
-			t.Errorf("packet %d failed to unpack", i)
-			continue
-		}
-		t.Logf("packet %d %s", i, m.String())
-	}
-}

+ 65 - 8
vendor/github.com/miekg/dns/dnssec.go

@@ -13,6 +13,7 @@ import (
 	_ "crypto/sha256"
 	_ "crypto/sha256"
 	_ "crypto/sha512"
 	_ "crypto/sha512"
 	"encoding/asn1"
 	"encoding/asn1"
+	"encoding/binary"
 	"encoding/hex"
 	"encoding/hex"
 	"math/big"
 	"math/big"
 	"sort"
 	"sort"
@@ -103,9 +104,7 @@ const (
 	ZONE   = 1 << 8
 	ZONE   = 1 << 8
 )
 )
 
 
-// The RRSIG needs to be converted to wireformat with some of
-// the rdata (the signature) missing. Use this struct to ease
-// the conversion (and re-use the pack/unpack functions).
+// The RRSIG needs to be converted to wireformat with some of the rdata (the signature) missing.
 type rrsigWireFmt struct {
 type rrsigWireFmt struct {
 	TypeCovered uint16
 	TypeCovered uint16
 	Algorithm   uint8
 	Algorithm   uint8
@@ -144,7 +143,7 @@ func (k *DNSKEY) KeyTag() uint16 {
 		// at the base64 values. But I'm lazy.
 		// at the base64 values. But I'm lazy.
 		modulus, _ := fromBase64([]byte(k.PublicKey))
 		modulus, _ := fromBase64([]byte(k.PublicKey))
 		if len(modulus) > 1 {
 		if len(modulus) > 1 {
-			x, _ := unpackUint16(modulus, len(modulus)-2)
+			x := binary.BigEndian.Uint16(modulus[len(modulus)-2:])
 			keytag = int(x)
 			keytag = int(x)
 		}
 		}
 	default:
 	default:
@@ -154,7 +153,7 @@ func (k *DNSKEY) KeyTag() uint16 {
 		keywire.Algorithm = k.Algorithm
 		keywire.Algorithm = k.Algorithm
 		keywire.PublicKey = k.PublicKey
 		keywire.PublicKey = k.PublicKey
 		wire := make([]byte, DefaultMsgSize)
 		wire := make([]byte, DefaultMsgSize)
-		n, err := PackStruct(keywire, wire, 0)
+		n, err := packKeyWire(keywire, wire)
 		if err != nil {
 		if err != nil {
 			return 0
 			return 0
 		}
 		}
@@ -192,7 +191,7 @@ func (k *DNSKEY) ToDS(h uint8) *DS {
 	keywire.Algorithm = k.Algorithm
 	keywire.Algorithm = k.Algorithm
 	keywire.PublicKey = k.PublicKey
 	keywire.PublicKey = k.PublicKey
 	wire := make([]byte, DefaultMsgSize)
 	wire := make([]byte, DefaultMsgSize)
-	n, err := PackStruct(keywire, wire, 0)
+	n, err := packKeyWire(keywire, wire)
 	if err != nil {
 	if err != nil {
 		return nil
 		return nil
 	}
 	}
@@ -289,7 +288,7 @@ func (rr *RRSIG) Sign(k crypto.Signer, rrset []RR) error {
 
 
 	// Create the desired binary blob
 	// Create the desired binary blob
 	signdata := make([]byte, DefaultMsgSize)
 	signdata := make([]byte, DefaultMsgSize)
-	n, err := PackStruct(sigwire, signdata, 0)
+	n, err := packSigWire(sigwire, signdata)
 	if err != nil {
 	if err != nil {
 		return err
 		return err
 	}
 	}
@@ -407,7 +406,7 @@ func (rr *RRSIG) Verify(k *DNSKEY, rrset []RR) error {
 	sigwire.SignerName = strings.ToLower(rr.SignerName)
 	sigwire.SignerName = strings.ToLower(rr.SignerName)
 	// Create the desired binary blob
 	// Create the desired binary blob
 	signeddata := make([]byte, DefaultMsgSize)
 	signeddata := make([]byte, DefaultMsgSize)
-	n, err := PackStruct(sigwire, signeddata, 0)
+	n, err := packSigWire(sigwire, signeddata)
 	if err != nil {
 	if err != nil {
 		return err
 		return err
 	}
 	}
@@ -662,3 +661,61 @@ func rawSignatureData(rrset []RR, s *RRSIG) (buf []byte, err error) {
 	}
 	}
 	return buf, nil
 	return buf, nil
 }
 }
+
+func packSigWire(sw *rrsigWireFmt, msg []byte) (int, error) {
+	// copied from zmsg.go RRSIG packing
+	off, err := packUint16(sw.TypeCovered, msg, 0)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(sw.Algorithm, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(sw.Labels, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint32(sw.OrigTtl, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint32(sw.Expiration, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint32(sw.Inception, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint16(sw.KeyTag, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = PackDomainName(sw.SignerName, msg, off, nil, false)
+	if err != nil {
+		return off, err
+	}
+	return off, nil
+}
+
+func packKeyWire(dw *dnskeyWireFmt, msg []byte) (int, error) {
+	// copied from zmsg.go DNSKEY packing
+	off, err := packUint16(dw.Flags, msg, 0)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(dw.Protocol, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(dw.Algorithm, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packStringBase64(dw.PublicKey, msg, off)
+	if err != nil {
+		return off, err
+	}
+	return off, nil
+}

+ 15 - 15
vendor/github.com/miekg/dns/dnssec_keyscan.go

@@ -14,7 +14,7 @@ import (
 // NewPrivateKey returns a PrivateKey by parsing the string s.
 // NewPrivateKey returns a PrivateKey by parsing the string s.
 // s should be in the same form of the BIND private key files.
 // s should be in the same form of the BIND private key files.
 func (k *DNSKEY) NewPrivateKey(s string) (crypto.PrivateKey, error) {
 func (k *DNSKEY) NewPrivateKey(s string) (crypto.PrivateKey, error) {
-	if s[len(s)-1] != '\n' { // We need a closing newline
+	if s == "" || s[len(s)-1] != '\n' { // We need a closing newline
 		return k.ReadPrivateKey(strings.NewReader(s+"\n"), "")
 		return k.ReadPrivateKey(strings.NewReader(s+"\n"), "")
 	}
 	}
 	return k.ReadPrivateKey(strings.NewReader(s), "")
 	return k.ReadPrivateKey(strings.NewReader(s), "")
@@ -25,9 +25,9 @@ func (k *DNSKEY) NewPrivateKey(s string) (crypto.PrivateKey, error) {
 // The public key must be known, because some cryptographic algorithms embed
 // The public key must be known, because some cryptographic algorithms embed
 // the public inside the privatekey.
 // the public inside the privatekey.
 func (k *DNSKEY) ReadPrivateKey(q io.Reader, file string) (crypto.PrivateKey, error) {
 func (k *DNSKEY) ReadPrivateKey(q io.Reader, file string) (crypto.PrivateKey, error) {
-	m, e := parseKey(q, file)
+	m, err := parseKey(q, file)
 	if m == nil {
 	if m == nil {
-		return nil, e
+		return nil, err
 	}
 	}
 	if _, ok := m["private-key-format"]; !ok {
 	if _, ok := m["private-key-format"]; !ok {
 		return nil, ErrPrivKey
 		return nil, ErrPrivKey
@@ -42,16 +42,16 @@ func (k *DNSKEY) ReadPrivateKey(q io.Reader, file string) (crypto.PrivateKey, er
 	}
 	}
 	switch uint8(algo) {
 	switch uint8(algo) {
 	case DSA:
 	case DSA:
-		priv, e := readPrivateKeyDSA(m)
-		if e != nil {
-			return nil, e
+		priv, err := readPrivateKeyDSA(m)
+		if err != nil {
+			return nil, err
 		}
 		}
 		pub := k.publicKeyDSA()
 		pub := k.publicKeyDSA()
 		if pub == nil {
 		if pub == nil {
 			return nil, ErrKey
 			return nil, ErrKey
 		}
 		}
 		priv.PublicKey = *pub
 		priv.PublicKey = *pub
-		return priv, e
+		return priv, nil
 	case RSAMD5:
 	case RSAMD5:
 		fallthrough
 		fallthrough
 	case RSASHA1:
 	case RSASHA1:
@@ -61,31 +61,31 @@ func (k *DNSKEY) ReadPrivateKey(q io.Reader, file string) (crypto.PrivateKey, er
 	case RSASHA256:
 	case RSASHA256:
 		fallthrough
 		fallthrough
 	case RSASHA512:
 	case RSASHA512:
-		priv, e := readPrivateKeyRSA(m)
-		if e != nil {
-			return nil, e
+		priv, err := readPrivateKeyRSA(m)
+		if err != nil {
+			return nil, err
 		}
 		}
 		pub := k.publicKeyRSA()
 		pub := k.publicKeyRSA()
 		if pub == nil {
 		if pub == nil {
 			return nil, ErrKey
 			return nil, ErrKey
 		}
 		}
 		priv.PublicKey = *pub
 		priv.PublicKey = *pub
-		return priv, e
+		return priv, nil
 	case ECCGOST:
 	case ECCGOST:
 		return nil, ErrPrivKey
 		return nil, ErrPrivKey
 	case ECDSAP256SHA256:
 	case ECDSAP256SHA256:
 		fallthrough
 		fallthrough
 	case ECDSAP384SHA384:
 	case ECDSAP384SHA384:
-		priv, e := readPrivateKeyECDSA(m)
-		if e != nil {
-			return nil, e
+		priv, err := readPrivateKeyECDSA(m)
+		if err != nil {
+			return nil, err
 		}
 		}
 		pub := k.publicKeyECDSA()
 		pub := k.publicKeyECDSA()
 		if pub == nil {
 		if pub == nil {
 			return nil, ErrKey
 			return nil, ErrKey
 		}
 		}
 		priv.PublicKey = *pub
 		priv.PublicKey = *pub
-		return priv, e
+		return priv, nil
 	default:
 	default:
 		return nil, ErrPrivKey
 		return nil, ErrPrivKey
 	}
 	}

+ 0 - 733
vendor/github.com/miekg/dns/dnssec_test.go

@@ -1,733 +0,0 @@
-package dns
-
-import (
-	"crypto"
-	"crypto/ecdsa"
-	"crypto/rsa"
-	"reflect"
-	"strings"
-	"testing"
-	"time"
-)
-
-func getKey() *DNSKEY {
-	key := new(DNSKEY)
-	key.Hdr.Name = "miek.nl."
-	key.Hdr.Class = ClassINET
-	key.Hdr.Ttl = 14400
-	key.Flags = 256
-	key.Protocol = 3
-	key.Algorithm = RSASHA256
-	key.PublicKey = "AwEAAcNEU67LJI5GEgF9QLNqLO1SMq1EdoQ6E9f85ha0k0ewQGCblyW2836GiVsm6k8Kr5ECIoMJ6fZWf3CQSQ9ycWfTyOHfmI3eQ/1Covhb2y4bAmL/07PhrL7ozWBW3wBfM335Ft9xjtXHPy7ztCbV9qZ4TVDTW/Iyg0PiwgoXVesz"
-	return key
-}
-
-func getSoa() *SOA {
-	soa := new(SOA)
-	soa.Hdr = RR_Header{"miek.nl.", TypeSOA, ClassINET, 14400, 0}
-	soa.Ns = "open.nlnetlabs.nl."
-	soa.Mbox = "miekg.atoom.net."
-	soa.Serial = 1293945905
-	soa.Refresh = 14400
-	soa.Retry = 3600
-	soa.Expire = 604800
-	soa.Minttl = 86400
-	return soa
-}
-
-func TestGenerateEC(t *testing.T) {
-	if testing.Short() {
-		t.Skip("skipping test in short mode.")
-	}
-	key := new(DNSKEY)
-	key.Hdr.Rrtype = TypeDNSKEY
-	key.Hdr.Name = "miek.nl."
-	key.Hdr.Class = ClassINET
-	key.Hdr.Ttl = 14400
-	key.Flags = 256
-	key.Protocol = 3
-	key.Algorithm = ECDSAP256SHA256
-	privkey, _ := key.Generate(256)
-	t.Log(key.String())
-	t.Log(key.PrivateKeyString(privkey))
-}
-
-func TestGenerateDSA(t *testing.T) {
-	if testing.Short() {
-		t.Skip("skipping test in short mode.")
-	}
-	key := new(DNSKEY)
-	key.Hdr.Rrtype = TypeDNSKEY
-	key.Hdr.Name = "miek.nl."
-	key.Hdr.Class = ClassINET
-	key.Hdr.Ttl = 14400
-	key.Flags = 256
-	key.Protocol = 3
-	key.Algorithm = DSA
-	privkey, _ := key.Generate(1024)
-	t.Log(key.String())
-	t.Log(key.PrivateKeyString(privkey))
-}
-
-func TestGenerateRSA(t *testing.T) {
-	if testing.Short() {
-		t.Skip("skipping test in short mode.")
-	}
-	key := new(DNSKEY)
-	key.Hdr.Rrtype = TypeDNSKEY
-	key.Hdr.Name = "miek.nl."
-	key.Hdr.Class = ClassINET
-	key.Hdr.Ttl = 14400
-	key.Flags = 256
-	key.Protocol = 3
-	key.Algorithm = RSASHA256
-	privkey, _ := key.Generate(1024)
-	t.Log(key.String())
-	t.Log(key.PrivateKeyString(privkey))
-}
-
-func TestSecure(t *testing.T) {
-	soa := getSoa()
-
-	sig := new(RRSIG)
-	sig.Hdr = RR_Header{"miek.nl.", TypeRRSIG, ClassINET, 14400, 0}
-	sig.TypeCovered = TypeSOA
-	sig.Algorithm = RSASHA256
-	sig.Labels = 2
-	sig.Expiration = 1296534305 // date -u '+%s' -d"2011-02-01 04:25:05"
-	sig.Inception = 1293942305  // date -u '+%s' -d"2011-01-02 04:25:05"
-	sig.OrigTtl = 14400
-	sig.KeyTag = 12051
-	sig.SignerName = "miek.nl."
-	sig.Signature = "oMCbslaAVIp/8kVtLSms3tDABpcPRUgHLrOR48OOplkYo+8TeEGWwkSwaz/MRo2fB4FxW0qj/hTlIjUGuACSd+b1wKdH5GvzRJc2pFmxtCbm55ygAh4EUL0F6U5cKtGJGSXxxg6UFCQ0doJCmiGFa78LolaUOXImJrk6AFrGa0M="
-
-	key := new(DNSKEY)
-	key.Hdr.Name = "miek.nl."
-	key.Hdr.Class = ClassINET
-	key.Hdr.Ttl = 14400
-	key.Flags = 256
-	key.Protocol = 3
-	key.Algorithm = RSASHA256
-	key.PublicKey = "AwEAAcNEU67LJI5GEgF9QLNqLO1SMq1EdoQ6E9f85ha0k0ewQGCblyW2836GiVsm6k8Kr5ECIoMJ6fZWf3CQSQ9ycWfTyOHfmI3eQ/1Covhb2y4bAmL/07PhrL7ozWBW3wBfM335Ft9xjtXHPy7ztCbV9qZ4TVDTW/Iyg0PiwgoXVesz"
-
-	// It should validate. Period is checked separately, so this will keep on working
-	if sig.Verify(key, []RR{soa}) != nil {
-		t.Error("failure to validate")
-	}
-}
-
-func TestSignature(t *testing.T) {
-	sig := new(RRSIG)
-	sig.Hdr.Name = "miek.nl."
-	sig.Hdr.Class = ClassINET
-	sig.Hdr.Ttl = 3600
-	sig.TypeCovered = TypeDNSKEY
-	sig.Algorithm = RSASHA1
-	sig.Labels = 2
-	sig.OrigTtl = 4000
-	sig.Expiration = 1000 //Thu Jan  1 02:06:40 CET 1970
-	sig.Inception = 800   //Thu Jan  1 01:13:20 CET 1970
-	sig.KeyTag = 34641
-	sig.SignerName = "miek.nl."
-	sig.Signature = "AwEAAaHIwpx3w4VHKi6i1LHnTaWeHCL154Jug0Rtc9ji5qwPXpBo6A5sRv7cSsPQKPIwxLpyCrbJ4mr2L0EPOdvP6z6YfljK2ZmTbogU9aSU2fiq/4wjxbdkLyoDVgtO+JsxNN4bjr4WcWhsmk1Hg93FV9ZpkWb0Tbad8DFqNDzr//kZ"
-
-	// Should not be valid
-	if sig.ValidityPeriod(time.Now()) {
-		t.Error("should not be valid")
-	}
-
-	sig.Inception = 315565800   //Tue Jan  1 10:10:00 CET 1980
-	sig.Expiration = 4102477800 //Fri Jan  1 10:10:00 CET 2100
-	if !sig.ValidityPeriod(time.Now()) {
-		t.Error("should be valid")
-	}
-}
-
-func TestSignVerify(t *testing.T) {
-	// The record we want to sign
-	soa := new(SOA)
-	soa.Hdr = RR_Header{"miek.nl.", TypeSOA, ClassINET, 14400, 0}
-	soa.Ns = "open.nlnetlabs.nl."
-	soa.Mbox = "miekg.atoom.net."
-	soa.Serial = 1293945905
-	soa.Refresh = 14400
-	soa.Retry = 3600
-	soa.Expire = 604800
-	soa.Minttl = 86400
-
-	soa1 := new(SOA)
-	soa1.Hdr = RR_Header{"*.miek.nl.", TypeSOA, ClassINET, 14400, 0}
-	soa1.Ns = "open.nlnetlabs.nl."
-	soa1.Mbox = "miekg.atoom.net."
-	soa1.Serial = 1293945905
-	soa1.Refresh = 14400
-	soa1.Retry = 3600
-	soa1.Expire = 604800
-	soa1.Minttl = 86400
-
-	srv := new(SRV)
-	srv.Hdr = RR_Header{"srv.miek.nl.", TypeSRV, ClassINET, 14400, 0}
-	srv.Port = 1000
-	srv.Weight = 800
-	srv.Target = "web1.miek.nl."
-
-	hinfo := &HINFO{
-		Hdr: RR_Header{
-			Name:   "miek.nl.",
-			Rrtype: TypeHINFO,
-			Class:  ClassINET,
-			Ttl:    3789,
-		},
-		Cpu: "X",
-		Os:  "Y",
-	}
-
-	// With this key
-	key := new(DNSKEY)
-	key.Hdr.Rrtype = TypeDNSKEY
-	key.Hdr.Name = "miek.nl."
-	key.Hdr.Class = ClassINET
-	key.Hdr.Ttl = 14400
-	key.Flags = 256
-	key.Protocol = 3
-	key.Algorithm = RSASHA256
-	privkey, _ := key.Generate(512)
-
-	// Fill in the values of the Sig, before signing
-	sig := new(RRSIG)
-	sig.Hdr = RR_Header{"miek.nl.", TypeRRSIG, ClassINET, 14400, 0}
-	sig.TypeCovered = soa.Hdr.Rrtype
-	sig.Labels = uint8(CountLabel(soa.Hdr.Name)) // works for all 3
-	sig.OrigTtl = soa.Hdr.Ttl
-	sig.Expiration = 1296534305 // date -u '+%s' -d"2011-02-01 04:25:05"
-	sig.Inception = 1293942305  // date -u '+%s' -d"2011-01-02 04:25:05"
-	sig.KeyTag = key.KeyTag()   // Get the keyfrom the Key
-	sig.SignerName = key.Hdr.Name
-	sig.Algorithm = RSASHA256
-
-	for _, r := range []RR{soa, soa1, srv, hinfo} {
-		if err := sig.Sign(privkey.(*rsa.PrivateKey), []RR{r}); err != nil {
-			t.Error("failure to sign the record:", err)
-			continue
-		}
-		if err := sig.Verify(key, []RR{r}); err != nil {
-			t.Error("failure to validate")
-			continue
-		}
-		t.Logf("validated: %s", r.Header().Name)
-	}
-}
-
-func Test65534(t *testing.T) {
-	t6 := new(RFC3597)
-	t6.Hdr = RR_Header{"miek.nl.", 65534, ClassINET, 14400, 0}
-	t6.Rdata = "505D870001"
-	key := new(DNSKEY)
-	key.Hdr.Name = "miek.nl."
-	key.Hdr.Rrtype = TypeDNSKEY
-	key.Hdr.Class = ClassINET
-	key.Hdr.Ttl = 14400
-	key.Flags = 256
-	key.Protocol = 3
-	key.Algorithm = RSASHA256
-	privkey, _ := key.Generate(1024)
-
-	sig := new(RRSIG)
-	sig.Hdr = RR_Header{"miek.nl.", TypeRRSIG, ClassINET, 14400, 0}
-	sig.TypeCovered = t6.Hdr.Rrtype
-	sig.Labels = uint8(CountLabel(t6.Hdr.Name))
-	sig.OrigTtl = t6.Hdr.Ttl
-	sig.Expiration = 1296534305 // date -u '+%s' -d"2011-02-01 04:25:05"
-	sig.Inception = 1293942305  // date -u '+%s' -d"2011-01-02 04:25:05"
-	sig.KeyTag = key.KeyTag()
-	sig.SignerName = key.Hdr.Name
-	sig.Algorithm = RSASHA256
-	if err := sig.Sign(privkey.(*rsa.PrivateKey), []RR{t6}); err != nil {
-		t.Error(err)
-		t.Error("failure to sign the TYPE65534 record")
-	}
-	if err := sig.Verify(key, []RR{t6}); err != nil {
-		t.Error(err)
-		t.Error("failure to validate")
-	} else {
-		t.Logf("validated: %s", t6.Header().Name)
-	}
-}
-
-func TestDnskey(t *testing.T) {
-	pubkey, err := ReadRR(strings.NewReader(`
-miek.nl.	IN	DNSKEY	256 3 10 AwEAAZuMCu2FdugHkTrXYgl5qixvcDw1aDDlvL46/xJKbHBAHY16fNUb2b65cwko2Js/aJxUYJbZk5dwCDZxYfrfbZVtDPQuc3o8QaChVxC7/JYz2AHc9qHvqQ1j4VrH71RWINlQo6VYjzN/BGpMhOZoZOEwzp1HfsOE3lNYcoWU1smL ;{id = 5240 (zsk), size = 1024b}
-`), "Kmiek.nl.+010+05240.key")
-	if err != nil {
-		t.Fatal(err)
-	}
-	privStr := `Private-key-format: v1.3
-Algorithm: 10 (RSASHA512)
-Modulus: m4wK7YV26AeROtdiCXmqLG9wPDVoMOW8vjr/EkpscEAdjXp81RvZvrlzCSjYmz9onFRgltmTl3AINnFh+t9tlW0M9C5zejxBoKFXELv8ljPYAdz2oe+pDWPhWsfvVFYg2VCjpViPM38EakyE5mhk4TDOnUd+w4TeU1hyhZTWyYs=
-PublicExponent: AQAB
-PrivateExponent: UfCoIQ/Z38l8vB6SSqOI/feGjHEl/fxIPX4euKf0D/32k30fHbSaNFrFOuIFmWMB3LimWVEs6u3dpbB9CQeCVg7hwU5puG7OtuiZJgDAhNeOnxvo5btp4XzPZrJSxR4WNQnwIiYWbl0aFlL1VGgHC/3By89ENZyWaZcMLW4KGWE=
-Prime1: yxwC6ogAu8aVcDx2wg1V0b5M5P6jP8qkRFVMxWNTw60Vkn+ECvw6YAZZBHZPaMyRYZLzPgUlyYRd0cjupy4+fQ==
-Prime2: xA1bF8M0RTIQ6+A11AoVG6GIR/aPGg5sogRkIZ7ID/sF6g9HMVU/CM2TqVEBJLRPp73cv6ZeC3bcqOCqZhz+pw==
-Exponent1: xzkblyZ96bGYxTVZm2/vHMOXswod4KWIyMoOepK6B/ZPcZoIT6omLCgtypWtwHLfqyCz3MK51Nc0G2EGzg8rFQ==
-Exponent2: Pu5+mCEb7T5F+kFNZhQadHUklt0JUHbi3hsEvVoHpEGSw3BGDQrtIflDde0/rbWHgDPM4WQY+hscd8UuTXrvLw==
-Coefficient: UuRoNqe7YHnKmQzE6iDWKTMIWTuoqqrFAmXPmKQnC+Y+BQzOVEHUo9bXdDnoI9hzXP1gf8zENMYwYLeWpuYlFQ==
-`
-	privkey, err := pubkey.(*DNSKEY).ReadPrivateKey(strings.NewReader(privStr),
-		"Kmiek.nl.+010+05240.private")
-	if err != nil {
-		t.Fatal(err)
-	}
-	if pubkey.(*DNSKEY).PublicKey != "AwEAAZuMCu2FdugHkTrXYgl5qixvcDw1aDDlvL46/xJKbHBAHY16fNUb2b65cwko2Js/aJxUYJbZk5dwCDZxYfrfbZVtDPQuc3o8QaChVxC7/JYz2AHc9qHvqQ1j4VrH71RWINlQo6VYjzN/BGpMhOZoZOEwzp1HfsOE3lNYcoWU1smL" {
-		t.Error("pubkey is not what we've read")
-	}
-	if pubkey.(*DNSKEY).PrivateKeyString(privkey) != privStr {
-		t.Error("privkey is not what we've read")
-		t.Errorf("%v", pubkey.(*DNSKEY).PrivateKeyString(privkey))
-	}
-}
-
-func TestTag(t *testing.T) {
-	key := new(DNSKEY)
-	key.Hdr.Name = "miek.nl."
-	key.Hdr.Rrtype = TypeDNSKEY
-	key.Hdr.Class = ClassINET
-	key.Hdr.Ttl = 3600
-	key.Flags = 256
-	key.Protocol = 3
-	key.Algorithm = RSASHA256
-	key.PublicKey = "AwEAAcNEU67LJI5GEgF9QLNqLO1SMq1EdoQ6E9f85ha0k0ewQGCblyW2836GiVsm6k8Kr5ECIoMJ6fZWf3CQSQ9ycWfTyOHfmI3eQ/1Covhb2y4bAmL/07PhrL7ozWBW3wBfM335Ft9xjtXHPy7ztCbV9qZ4TVDTW/Iyg0PiwgoXVesz"
-
-	tag := key.KeyTag()
-	if tag != 12051 {
-		t.Errorf("wrong key tag: %d for key %v", tag, key)
-	}
-}
-
-func TestKeyRSA(t *testing.T) {
-	if testing.Short() {
-		t.Skip("skipping test in short mode.")
-	}
-	key := new(DNSKEY)
-	key.Hdr.Name = "miek.nl."
-	key.Hdr.Rrtype = TypeDNSKEY
-	key.Hdr.Class = ClassINET
-	key.Hdr.Ttl = 3600
-	key.Flags = 256
-	key.Protocol = 3
-	key.Algorithm = RSASHA256
-	priv, _ := key.Generate(2048)
-
-	soa := new(SOA)
-	soa.Hdr = RR_Header{"miek.nl.", TypeSOA, ClassINET, 14400, 0}
-	soa.Ns = "open.nlnetlabs.nl."
-	soa.Mbox = "miekg.atoom.net."
-	soa.Serial = 1293945905
-	soa.Refresh = 14400
-	soa.Retry = 3600
-	soa.Expire = 604800
-	soa.Minttl = 86400
-
-	sig := new(RRSIG)
-	sig.Hdr = RR_Header{"miek.nl.", TypeRRSIG, ClassINET, 14400, 0}
-	sig.TypeCovered = TypeSOA
-	sig.Algorithm = RSASHA256
-	sig.Labels = 2
-	sig.Expiration = 1296534305 // date -u '+%s' -d"2011-02-01 04:25:05"
-	sig.Inception = 1293942305  // date -u '+%s' -d"2011-01-02 04:25:05"
-	sig.OrigTtl = soa.Hdr.Ttl
-	sig.KeyTag = key.KeyTag()
-	sig.SignerName = key.Hdr.Name
-
-	if err := sig.Sign(priv.(*rsa.PrivateKey), []RR{soa}); err != nil {
-		t.Error("failed to sign")
-		return
-	}
-	if err := sig.Verify(key, []RR{soa}); err != nil {
-		t.Error("failed to verify")
-	}
-}
-
-func TestKeyToDS(t *testing.T) {
-	key := new(DNSKEY)
-	key.Hdr.Name = "miek.nl."
-	key.Hdr.Rrtype = TypeDNSKEY
-	key.Hdr.Class = ClassINET
-	key.Hdr.Ttl = 3600
-	key.Flags = 256
-	key.Protocol = 3
-	key.Algorithm = RSASHA256
-	key.PublicKey = "AwEAAcNEU67LJI5GEgF9QLNqLO1SMq1EdoQ6E9f85ha0k0ewQGCblyW2836GiVsm6k8Kr5ECIoMJ6fZWf3CQSQ9ycWfTyOHfmI3eQ/1Covhb2y4bAmL/07PhrL7ozWBW3wBfM335Ft9xjtXHPy7ztCbV9qZ4TVDTW/Iyg0PiwgoXVesz"
-
-	ds := key.ToDS(SHA1)
-	if strings.ToUpper(ds.Digest) != "B5121BDB5B8D86D0CC5FFAFBAAABE26C3E20BAC1" {
-		t.Errorf("wrong DS digest for SHA1\n%v", ds)
-	}
-}
-
-func TestSignRSA(t *testing.T) {
-	pub := "miek.nl. IN DNSKEY 256 3 5 AwEAAb+8lGNCxJgLS8rYVer6EnHVuIkQDghdjdtewDzU3G5R7PbMbKVRvH2Ma7pQyYceoaqWZQirSj72euPWfPxQnMy9ucCylA+FuH9cSjIcPf4PqJfdupHk9X6EBYjxrCLY4p1/yBwgyBIRJtZtAqM3ceAH2WovEJD6rTtOuHo5AluJ"
-
-	priv := `Private-key-format: v1.3
-Algorithm: 5 (RSASHA1)
-Modulus: v7yUY0LEmAtLythV6voScdW4iRAOCF2N217APNTcblHs9sxspVG8fYxrulDJhx6hqpZlCKtKPvZ649Z8/FCczL25wLKUD4W4f1xKMhw9/g+ol926keT1foQFiPGsItjinX/IHCDIEhEm1m0Cozdx4AfZai8QkPqtO064ejkCW4k=
-PublicExponent: AQAB
-PrivateExponent: YPwEmwjk5HuiROKU4xzHQ6l1hG8Iiha4cKRG3P5W2b66/EN/GUh07ZSf0UiYB67o257jUDVEgwCuPJz776zfApcCB4oGV+YDyEu7Hp/rL8KcSN0la0k2r9scKwxTp4BTJT23zyBFXsV/1wRDK1A5NxsHPDMYi2SoK63Enm/1ptk=
-Prime1: /wjOG+fD0ybNoSRn7nQ79udGeR1b0YhUA5mNjDx/x2fxtIXzygYk0Rhx9QFfDy6LOBvz92gbNQlzCLz3DJt5hw==
-Prime2: wHZsJ8OGhkp5p3mrJFZXMDc2mbYusDVTA+t+iRPdS797Tj0pjvU2HN4vTnTj8KBQp6hmnY7dLp9Y1qserySGbw==
-Exponent1: N0A7FsSRIg+IAN8YPQqlawoTtG1t1OkJ+nWrurPootScApX6iMvn8fyvw3p2k51rv84efnzpWAYiC8SUaQDNxQ==
-Exponent2: SvuYRaGyvo0zemE3oS+WRm2scxR8eiA8WJGeOc+obwOKCcBgeZblXzfdHGcEC1KaOcetOwNW/vwMA46lpLzJNw==
-Coefficient: 8+7ZN/JgByqv0NfULiFKTjtyegUcijRuyij7yNxYbCBneDvZGxJwKNi4YYXWx743pcAj4Oi4Oh86gcmxLs+hGw==
-Created: 20110302104537
-Publish: 20110302104537
-Activate: 20110302104537`
-
-	xk, _ := NewRR(pub)
-	k := xk.(*DNSKEY)
-	p, err := k.NewPrivateKey(priv)
-	if err != nil {
-		t.Error(err)
-	}
-	switch priv := p.(type) {
-	case *rsa.PrivateKey:
-		if 65537 != priv.PublicKey.E {
-			t.Error("exponenent should be 65537")
-		}
-	default:
-		t.Errorf("we should have read an RSA key: %v", priv)
-	}
-	if k.KeyTag() != 37350 {
-		t.Errorf("keytag should be 37350, got %d %v", k.KeyTag(), k)
-	}
-
-	soa := new(SOA)
-	soa.Hdr = RR_Header{"miek.nl.", TypeSOA, ClassINET, 14400, 0}
-	soa.Ns = "open.nlnetlabs.nl."
-	soa.Mbox = "miekg.atoom.net."
-	soa.Serial = 1293945905
-	soa.Refresh = 14400
-	soa.Retry = 3600
-	soa.Expire = 604800
-	soa.Minttl = 86400
-
-	sig := new(RRSIG)
-	sig.Hdr = RR_Header{"miek.nl.", TypeRRSIG, ClassINET, 14400, 0}
-	sig.Expiration = 1296534305 // date -u '+%s' -d"2011-02-01 04:25:05"
-	sig.Inception = 1293942305  // date -u '+%s' -d"2011-01-02 04:25:05"
-	sig.KeyTag = k.KeyTag()
-	sig.SignerName = k.Hdr.Name
-	sig.Algorithm = k.Algorithm
-
-	sig.Sign(p.(*rsa.PrivateKey), []RR{soa})
-	if sig.Signature != "D5zsobpQcmMmYsUMLxCVEtgAdCvTu8V/IEeP4EyLBjqPJmjt96bwM9kqihsccofA5LIJ7DN91qkCORjWSTwNhzCv7bMyr2o5vBZElrlpnRzlvsFIoAZCD9xg6ZY7ZyzUJmU6IcTwG4v3xEYajcpbJJiyaw/RqR90MuRdKPiBzSo=" {
-		t.Errorf("signature is not correct: %v", sig)
-	}
-}
-
-func TestSignVerifyECDSA(t *testing.T) {
-	pub := `example.net. 3600 IN DNSKEY 257 3 14 (
-	xKYaNhWdGOfJ+nPrL8/arkwf2EY3MDJ+SErKivBVSum1
-	w/egsXvSADtNJhyem5RCOpgQ6K8X1DRSEkrbYQ+OB+v8
-	/uX45NBwY8rp65F6Glur8I/mlVNgF6W/qTI37m40 )`
-	priv := `Private-key-format: v1.2
-Algorithm: 14 (ECDSAP384SHA384)
-PrivateKey: WURgWHCcYIYUPWgeLmiPY2DJJk02vgrmTfitxgqcL4vwW7BOrbawVmVe0d9V94SR`
-
-	eckey, err := NewRR(pub)
-	if err != nil {
-		t.Fatal(err)
-	}
-	privkey, err := eckey.(*DNSKEY).NewPrivateKey(priv)
-	if err != nil {
-		t.Fatal(err)
-	}
-	// TODO: Create separate test for this
-	ds := eckey.(*DNSKEY).ToDS(SHA384)
-	if ds.KeyTag != 10771 {
-		t.Fatal("wrong keytag on DS")
-	}
-	if ds.Digest != "72d7b62976ce06438e9c0bf319013cf801f09ecc84b8d7e9495f27e305c6a9b0563a9b5f4d288405c3008a946df983d6" {
-		t.Fatal("wrong DS Digest")
-	}
-	a, _ := NewRR("www.example.net. 3600 IN A 192.0.2.1")
-	sig := new(RRSIG)
-	sig.Hdr = RR_Header{"example.net.", TypeRRSIG, ClassINET, 14400, 0}
-	sig.Expiration, _ = StringToTime("20100909102025")
-	sig.Inception, _ = StringToTime("20100812102025")
-	sig.KeyTag = eckey.(*DNSKEY).KeyTag()
-	sig.SignerName = eckey.(*DNSKEY).Hdr.Name
-	sig.Algorithm = eckey.(*DNSKEY).Algorithm
-
-	if sig.Sign(privkey.(*ecdsa.PrivateKey), []RR{a}) != nil {
-		t.Fatal("failure to sign the record")
-	}
-
-	if err := sig.Verify(eckey.(*DNSKEY), []RR{a}); err != nil {
-		t.Fatalf("failure to validate:\n%s\n%s\n%s\n\n%s\n\n%v",
-			eckey.(*DNSKEY).String(),
-			a.String(),
-			sig.String(),
-			eckey.(*DNSKEY).PrivateKeyString(privkey),
-			err,
-		)
-	}
-}
-
-func TestSignVerifyECDSA2(t *testing.T) {
-	srv1, err := NewRR("srv.miek.nl. IN SRV 1000 800 0 web1.miek.nl.")
-	if err != nil {
-		t.Fatal(err)
-	}
-	srv := srv1.(*SRV)
-
-	// With this key
-	key := new(DNSKEY)
-	key.Hdr.Rrtype = TypeDNSKEY
-	key.Hdr.Name = "miek.nl."
-	key.Hdr.Class = ClassINET
-	key.Hdr.Ttl = 14400
-	key.Flags = 256
-	key.Protocol = 3
-	key.Algorithm = ECDSAP256SHA256
-	privkey, err := key.Generate(256)
-	if err != nil {
-		t.Fatal("failure to generate key")
-	}
-
-	// Fill in the values of the Sig, before signing
-	sig := new(RRSIG)
-	sig.Hdr = RR_Header{"miek.nl.", TypeRRSIG, ClassINET, 14400, 0}
-	sig.TypeCovered = srv.Hdr.Rrtype
-	sig.Labels = uint8(CountLabel(srv.Hdr.Name)) // works for all 3
-	sig.OrigTtl = srv.Hdr.Ttl
-	sig.Expiration = 1296534305 // date -u '+%s' -d"2011-02-01 04:25:05"
-	sig.Inception = 1293942305  // date -u '+%s' -d"2011-01-02 04:25:05"
-	sig.KeyTag = key.KeyTag()   // Get the keyfrom the Key
-	sig.SignerName = key.Hdr.Name
-	sig.Algorithm = ECDSAP256SHA256
-
-	if sig.Sign(privkey.(*ecdsa.PrivateKey), []RR{srv}) != nil {
-		t.Fatal("failure to sign the record")
-	}
-
-	err = sig.Verify(key, []RR{srv})
-	if err != nil {
-		t.Logf("failure to validate:\n%s\n%s\n%s\n\n%s\n\n%v",
-			key.String(),
-			srv.String(),
-			sig.String(),
-			key.PrivateKeyString(privkey),
-			err,
-		)
-	}
-}
-
-// Here the test vectors from the relevant RFCs are checked.
-// rfc6605 6.1
-func TestRFC6605P256(t *testing.T) {
-	exDNSKEY := `example.net. 3600 IN DNSKEY 257 3 13 (
-                 GojIhhXUN/u4v54ZQqGSnyhWJwaubCvTmeexv7bR6edb
-                 krSqQpF64cYbcB7wNcP+e+MAnLr+Wi9xMWyQLc8NAA== )`
-	exPriv := `Private-key-format: v1.2
-Algorithm: 13 (ECDSAP256SHA256)
-PrivateKey: GU6SnQ/Ou+xC5RumuIUIuJZteXT2z0O/ok1s38Et6mQ=`
-	rrDNSKEY, err := NewRR(exDNSKEY)
-	if err != nil {
-		t.Fatal(err)
-	}
-	priv, err := rrDNSKEY.(*DNSKEY).NewPrivateKey(exPriv)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	exDS := `example.net. 3600 IN DS 55648 13 2 (
-             b4c8c1fe2e7477127b27115656ad6256f424625bf5c1
-             e2770ce6d6e37df61d17 )`
-	rrDS, err := NewRR(exDS)
-	if err != nil {
-		t.Fatal(err)
-	}
-	ourDS := rrDNSKEY.(*DNSKEY).ToDS(SHA256)
-	if !reflect.DeepEqual(ourDS, rrDS.(*DS)) {
-		t.Errorf("DS record differs:\n%v\n%v", ourDS, rrDS.(*DS))
-	}
-
-	exA := `www.example.net. 3600 IN A 192.0.2.1`
-	exRRSIG := `www.example.net. 3600 IN RRSIG A 13 3 3600 (
-                20100909100439 20100812100439 55648 example.net.
-                qx6wLYqmh+l9oCKTN6qIc+bw6ya+KJ8oMz0YP107epXA
-                yGmt+3SNruPFKG7tZoLBLlUzGGus7ZwmwWep666VCw== )`
-	rrA, err := NewRR(exA)
-	if err != nil {
-		t.Fatal(err)
-	}
-	rrRRSIG, err := NewRR(exRRSIG)
-	if err != nil {
-		t.Fatal(err)
-	}
-	if err = rrRRSIG.(*RRSIG).Verify(rrDNSKEY.(*DNSKEY), []RR{rrA}); err != nil {
-		t.Errorf("failure to validate the spec RRSIG: %v", err)
-	}
-
-	ourRRSIG := &RRSIG{
-		Hdr: RR_Header{
-			Ttl: rrA.Header().Ttl,
-		},
-		KeyTag:     rrDNSKEY.(*DNSKEY).KeyTag(),
-		SignerName: rrDNSKEY.(*DNSKEY).Hdr.Name,
-		Algorithm:  rrDNSKEY.(*DNSKEY).Algorithm,
-	}
-	ourRRSIG.Expiration, _ = StringToTime("20100909100439")
-	ourRRSIG.Inception, _ = StringToTime("20100812100439")
-	err = ourRRSIG.Sign(priv.(*ecdsa.PrivateKey), []RR{rrA})
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	if err = ourRRSIG.Verify(rrDNSKEY.(*DNSKEY), []RR{rrA}); err != nil {
-		t.Errorf("failure to validate our RRSIG: %v", err)
-	}
-
-	// Signatures are randomized
-	rrRRSIG.(*RRSIG).Signature = ""
-	ourRRSIG.Signature = ""
-	if !reflect.DeepEqual(ourRRSIG, rrRRSIG.(*RRSIG)) {
-		t.Fatalf("RRSIG record differs:\n%v\n%v", ourRRSIG, rrRRSIG.(*RRSIG))
-	}
-}
-
-// rfc6605 6.2
-func TestRFC6605P384(t *testing.T) {
-	exDNSKEY := `example.net. 3600 IN DNSKEY 257 3 14 (
-                 xKYaNhWdGOfJ+nPrL8/arkwf2EY3MDJ+SErKivBVSum1
-                 w/egsXvSADtNJhyem5RCOpgQ6K8X1DRSEkrbYQ+OB+v8
-                 /uX45NBwY8rp65F6Glur8I/mlVNgF6W/qTI37m40 )`
-	exPriv := `Private-key-format: v1.2
-Algorithm: 14 (ECDSAP384SHA384)
-PrivateKey: WURgWHCcYIYUPWgeLmiPY2DJJk02vgrmTfitxgqcL4vwW7BOrbawVmVe0d9V94SR`
-	rrDNSKEY, err := NewRR(exDNSKEY)
-	if err != nil {
-		t.Fatal(err)
-	}
-	priv, err := rrDNSKEY.(*DNSKEY).NewPrivateKey(exPriv)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	exDS := `example.net. 3600 IN DS 10771 14 4 (
-           72d7b62976ce06438e9c0bf319013cf801f09ecc84b8
-           d7e9495f27e305c6a9b0563a9b5f4d288405c3008a94
-           6df983d6 )`
-	rrDS, err := NewRR(exDS)
-	if err != nil {
-		t.Fatal(err)
-	}
-	ourDS := rrDNSKEY.(*DNSKEY).ToDS(SHA384)
-	if !reflect.DeepEqual(ourDS, rrDS.(*DS)) {
-		t.Fatalf("DS record differs:\n%v\n%v", ourDS, rrDS.(*DS))
-	}
-
-	exA := `www.example.net. 3600 IN A 192.0.2.1`
-	exRRSIG := `www.example.net. 3600 IN RRSIG A 14 3 3600 (
-           20100909102025 20100812102025 10771 example.net.
-           /L5hDKIvGDyI1fcARX3z65qrmPsVz73QD1Mr5CEqOiLP
-           95hxQouuroGCeZOvzFaxsT8Glr74hbavRKayJNuydCuz
-           WTSSPdz7wnqXL5bdcJzusdnI0RSMROxxwGipWcJm )`
-	rrA, err := NewRR(exA)
-	if err != nil {
-		t.Fatal(err)
-	}
-	rrRRSIG, err := NewRR(exRRSIG)
-	if err != nil {
-		t.Fatal(err)
-	}
-	if err = rrRRSIG.(*RRSIG).Verify(rrDNSKEY.(*DNSKEY), []RR{rrA}); err != nil {
-		t.Errorf("failure to validate the spec RRSIG: %v", err)
-	}
-
-	ourRRSIG := &RRSIG{
-		Hdr: RR_Header{
-			Ttl: rrA.Header().Ttl,
-		},
-		KeyTag:     rrDNSKEY.(*DNSKEY).KeyTag(),
-		SignerName: rrDNSKEY.(*DNSKEY).Hdr.Name,
-		Algorithm:  rrDNSKEY.(*DNSKEY).Algorithm,
-	}
-	ourRRSIG.Expiration, _ = StringToTime("20100909102025")
-	ourRRSIG.Inception, _ = StringToTime("20100812102025")
-	err = ourRRSIG.Sign(priv.(*ecdsa.PrivateKey), []RR{rrA})
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	if err = ourRRSIG.Verify(rrDNSKEY.(*DNSKEY), []RR{rrA}); err != nil {
-		t.Errorf("failure to validate our RRSIG: %v", err)
-	}
-
-	// Signatures are randomized
-	rrRRSIG.(*RRSIG).Signature = ""
-	ourRRSIG.Signature = ""
-	if !reflect.DeepEqual(ourRRSIG, rrRRSIG.(*RRSIG)) {
-		t.Fatalf("RRSIG record differs:\n%v\n%v", ourRRSIG, rrRRSIG.(*RRSIG))
-	}
-}
-
-func TestInvalidRRSet(t *testing.T) {
-	goodRecords := make([]RR, 2)
-	goodRecords[0] = &TXT{Hdr: RR_Header{Name: "name.cloudflare.com.", Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}, Txt: []string{"Hello world"}}
-	goodRecords[1] = &TXT{Hdr: RR_Header{Name: "name.cloudflare.com.", Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}, Txt: []string{"_o/"}}
-
-	// Generate key
-	keyname := "cloudflare.com."
-	key := &DNSKEY{
-		Hdr:       RR_Header{Name: keyname, Rrtype: TypeDNSKEY, Class: ClassINET, Ttl: 0},
-		Algorithm: ECDSAP256SHA256,
-		Flags:     ZONE,
-		Protocol:  3,
-	}
-	privatekey, err := key.Generate(256)
-	if err != nil {
-		t.Fatal(err.Error())
-	}
-
-	// Need to fill in: Inception, Expiration, KeyTag, SignerName and Algorithm
-	curTime := time.Now()
-	signature := &RRSIG{
-		Inception:  uint32(curTime.Unix()),
-		Expiration: uint32(curTime.Add(time.Hour).Unix()),
-		KeyTag:     key.KeyTag(),
-		SignerName: keyname,
-		Algorithm:  ECDSAP256SHA256,
-	}
-
-	// Inconsistent name between records
-	badRecords := make([]RR, 2)
-	badRecords[0] = &TXT{Hdr: RR_Header{Name: "name.cloudflare.com.", Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}, Txt: []string{"Hello world"}}
-	badRecords[1] = &TXT{Hdr: RR_Header{Name: "nama.cloudflare.com.", Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}, Txt: []string{"_o/"}}
-
-	if IsRRset(badRecords) {
-		t.Fatal("Record set with inconsistent names considered valid")
-	}
-
-	badRecords[0] = &TXT{Hdr: RR_Header{Name: "name.cloudflare.com.", Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}, Txt: []string{"Hello world"}}
-	badRecords[1] = &A{Hdr: RR_Header{Name: "name.cloudflare.com.", Rrtype: TypeA, Class: ClassINET, Ttl: 0}}
-
-	if IsRRset(badRecords) {
-		t.Fatal("Record set with inconsistent record types considered valid")
-	}
-
-	badRecords[0] = &TXT{Hdr: RR_Header{Name: "name.cloudflare.com.", Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}, Txt: []string{"Hello world"}}
-	badRecords[1] = &TXT{Hdr: RR_Header{Name: "name.cloudflare.com.", Rrtype: TypeTXT, Class: ClassCHAOS, Ttl: 0}, Txt: []string{"_o/"}}
-
-	if IsRRset(badRecords) {
-		t.Fatal("Record set with inconsistent record class considered valid")
-	}
-
-	// Sign the good record set and then make sure verification fails on the bad record set
-	if err := signature.Sign(privatekey.(crypto.Signer), goodRecords); err != nil {
-		t.Fatal("Signing good records failed")
-	}
-
-	if err := signature.Verify(key, badRecords); err != ErrRRset {
-		t.Fatal("Verification did not return ErrRRset with inconsistent records")
-	}
-}

+ 0 - 79
vendor/github.com/miekg/dns/dnsutil/util.go

@@ -1,79 +0,0 @@
-// Package dnsutil contains higher-level methods useful with the dns
-// package.  While package dns implements the DNS protocols itself,
-// these functions are related but not directly required for protocol
-// processing.  They are often useful in preparing input/output of the
-// functions in package dns.
-package dnsutil
-
-import (
-	"strings"
-
-	"github.com/miekg/dns"
-)
-
-// AddDomain adds origin to s if s is not already a FQDN.
-// Note that the result may not be a FQDN.  If origin does not end
-// with a ".", the result won't either.
-// This implements the zonefile convention (specified in RFC 1035,
-// Section "5.1. Format") that "@" represents the
-// apex (bare) domain. i.e. AddOrigin("@", "foo.com.") returns "foo.com.".
-func AddOrigin(s, origin string) string {
-	// ("foo.", "origin.") -> "foo." (already a FQDN)
-	// ("foo", "origin.") -> "foo.origin."
-	// ("foo"), "origin" -> "foo.origin"
-	// ("@", "origin.") -> "origin." (@ represents the apex (bare) domain)
-	// ("", "origin.") -> "origin." (not obvious)
-	// ("foo", "") -> "foo" (not obvious)
-
-	if dns.IsFqdn(s) {
-		return s // s is already a FQDN, no need to mess with it.
-	}
-	if len(origin) == 0 {
-		return s // Nothing to append.
-	}
-	if s == "@" || len(s) == 0 {
-		return origin // Expand apex.
-	}
-
-	if origin == "." {
-		return s + origin // AddOrigin(s, ".") is an expensive way to add a ".".
-	}
-
-	return s + "." + origin // The simple case.
-}
-
-// TrimDomainName trims origin from s if s is a subdomain.
-// This function will never return "", but returns "@" instead (@ represents the apex (bare) domain).
-func TrimDomainName(s, origin string) string {
-	// An apex (bare) domain is always returned as "@".
-	// If the return value ends in a ".", the domain was not the suffix.
-	// origin can end in "." or not. Either way the results should be the same.
-
-	if len(s) == 0 {
-		return "@" // Return the apex (@) rather than "".
-	}
-	// Someone is using TrimDomainName(s, ".") to remove a dot if it exists.
-	if origin == "." {
-		return strings.TrimSuffix(s, origin)
-	}
-
-	// Dude, you aren't even if the right subdomain!
-	if !dns.IsSubDomain(origin, s) {
-		return s
-	}
-
-	slabels := dns.Split(s)
-	olabels := dns.Split(origin)
-	m := dns.CompareDomainName(s, origin)
-	if len(olabels) == m {
-		if len(olabels) == len(slabels) {
-			return "@" // origin == s
-		}
-		if (s[0] == '.') && (len(slabels) == (len(olabels) + 1)) {
-			return "@" // TrimDomainName(".foo.", "foo.")
-		}
-	}
-
-	// Return the first (len-m) labels:
-	return s[:slabels[len(slabels)-m]-1]
-}

+ 0 - 130
vendor/github.com/miekg/dns/dnsutil/util_test.go

@@ -1,130 +0,0 @@
-package dnsutil
-
-import "testing"
-
-func TestAddOrigin(t *testing.T) {
-	var tests = []struct{ e1, e2, expected string }{
-		{"@", "example.com", "example.com"},
-		{"foo", "example.com", "foo.example.com"},
-		{"foo.", "example.com", "foo."},
-		{"@", "example.com.", "example.com."},
-		{"foo", "example.com.", "foo.example.com."},
-		{"foo.", "example.com.", "foo."},
-		// Oddball tests:
-		// In general origin should not be "" or "." but at least
-		// these tests verify we don't crash and will keep results
-		// from changing unexpectedly.
-		{"*.", "", "*."},
-		{"@", "", "@"},
-		{"foobar", "", "foobar"},
-		{"foobar.", "", "foobar."},
-		{"*.", ".", "*."},
-		{"@", ".", "."},
-		{"foobar", ".", "foobar."},
-		{"foobar.", ".", "foobar."},
-	}
-	for _, test := range tests {
-		actual := AddOrigin(test.e1, test.e2)
-		if test.expected != actual {
-			t.Errorf("AddOrigin(%#v, %#v) expected %#v, go %#v\n", test.e1, test.e2, test.expected, actual)
-		}
-	}
-}
-
-func TestTrimDomainName(t *testing.T) {
-
-	// Basic tests.
-	// Try trimming "example.com" and "example.com." from typical use cases.
-	var tests_examplecom = []struct{ experiment, expected string }{
-		{"foo.example.com", "foo"},
-		{"foo.example.com.", "foo"},
-		{".foo.example.com", ".foo"},
-		{".foo.example.com.", ".foo"},
-		{"*.example.com", "*"},
-		{"example.com", "@"},
-		{"example.com.", "@"},
-		{"com.", "com."},
-		{"foo.", "foo."},
-		{"serverfault.com.", "serverfault.com."},
-		{"serverfault.com", "serverfault.com"},
-		{".foo.ronco.com", ".foo.ronco.com"},
-		{".foo.ronco.com.", ".foo.ronco.com."},
-	}
-	for _, dom := range []string{"example.com", "example.com."} {
-		for i, test := range tests_examplecom {
-			actual := TrimDomainName(test.experiment, dom)
-			if test.expected != actual {
-				t.Errorf("%d TrimDomainName(%#v, %#v): expected (%v) got (%v)\n", i, test.experiment, dom, test.expected, actual)
-			}
-		}
-	}
-
-	// Paranoid tests.
-	// These test shouldn't be needed but I was weary of off-by-one errors.
-	// In theory, these can't happen because there are no single-letter TLDs,
-	// but it is good to exercize the code this way.
-	var tests = []struct{ experiment, expected string }{
-		{"", "@"},
-		{".", "."},
-		{"a.b.c.d.e.f.", "a.b.c.d.e"},
-		{"b.c.d.e.f.", "b.c.d.e"},
-		{"c.d.e.f.", "c.d.e"},
-		{"d.e.f.", "d.e"},
-		{"e.f.", "e"},
-		{"f.", "@"},
-		{".a.b.c.d.e.f.", ".a.b.c.d.e"},
-		{".b.c.d.e.f.", ".b.c.d.e"},
-		{".c.d.e.f.", ".c.d.e"},
-		{".d.e.f.", ".d.e"},
-		{".e.f.", ".e"},
-		{".f.", "@"},
-		{"a.b.c.d.e.f", "a.b.c.d.e"},
-		{"a.b.c.d.e.", "a.b.c.d.e."},
-		{"a.b.c.d.e", "a.b.c.d.e"},
-		{"a.b.c.d.", "a.b.c.d."},
-		{"a.b.c.d", "a.b.c.d"},
-		{"a.b.c.", "a.b.c."},
-		{"a.b.c", "a.b.c"},
-		{"a.b.", "a.b."},
-		{"a.b", "a.b"},
-		{"a.", "a."},
-		{"a", "a"},
-		{".a.b.c.d.e.f", ".a.b.c.d.e"},
-		{".a.b.c.d.e.", ".a.b.c.d.e."},
-		{".a.b.c.d.e", ".a.b.c.d.e"},
-		{".a.b.c.d.", ".a.b.c.d."},
-		{".a.b.c.d", ".a.b.c.d"},
-		{".a.b.c.", ".a.b.c."},
-		{".a.b.c", ".a.b.c"},
-		{".a.b.", ".a.b."},
-		{".a.b", ".a.b"},
-		{".a.", ".a."},
-		{".a", ".a"},
-	}
-	for _, dom := range []string{"f", "f."} {
-		for i, test := range tests {
-			actual := TrimDomainName(test.experiment, dom)
-			if test.expected != actual {
-				t.Errorf("%d TrimDomainName(%#v, %#v): expected (%v) got (%v)\n", i, test.experiment, dom, test.expected, actual)
-			}
-		}
-	}
-
-	// Test cases for bugs found in the wild.
-	// These test cases provide both origin, s, and the expected result.
-	// If you find a bug in the while, this is probably the easiest place
-	// to add it as a test case.
-	var tests_wild = []struct{ e1, e2, expected string }{
-		{"mathoverflow.net.", ".", "mathoverflow.net"},
-		{"mathoverflow.net", ".", "mathoverflow.net"},
-		{"", ".", "@"},
-		{"@", ".", "@"},
-	}
-	for i, test := range tests_wild {
-		actual := TrimDomainName(test.e1, test.e2)
-		if test.expected != actual {
-			t.Errorf("%d TrimDomainName(%#v, %#v): expected (%v) got (%v)\n", i, test.e1, test.e2, test.expected, actual)
-		}
-	}
-
-}

+ 1 - 1
vendor/github.com/miekg/dns/doc.go

@@ -203,7 +203,7 @@ RFC 6895 sets aside a range of type codes for private use. This range
 is 65,280 - 65,534 (0xFF00 - 0xFFFE). When experimenting with new Resource Records these
 is 65,280 - 65,534 (0xFF00 - 0xFFFE). When experimenting with new Resource Records these
 can be used, before requesting an official type code from IANA.
 can be used, before requesting an official type code from IANA.
 
 
-see http://miek.nl/posts/2014/Sep/21/Private%20RRs%20and%20IDN%20in%20Go%20DNS/ for more
+see http://miek.nl/2014/September/21/idn-and-private-rr-in-go-dns/ for more
 information.
 information.
 
 
 EDNS0
 EDNS0

+ 0 - 3
vendor/github.com/miekg/dns/dyn_test.go

@@ -1,3 +0,0 @@
-package dns
-
-// Find better solution

+ 73 - 36
vendor/github.com/miekg/dns/edns.go

@@ -1,6 +1,7 @@
 package dns
 package dns
 
 
 import (
 import (
+	"encoding/binary"
 	"encoding/hex"
 	"encoding/hex"
 	"errors"
 	"errors"
 	"net"
 	"net"
@@ -17,6 +18,7 @@ const (
 	EDNS0N3U         = 0x7     // NSEC3 Hash Understood
 	EDNS0N3U         = 0x7     // NSEC3 Hash Understood
 	EDNS0SUBNET      = 0x8     // client-subnet (RFC6891)
 	EDNS0SUBNET      = 0x8     // client-subnet (RFC6891)
 	EDNS0EXPIRE      = 0x9     // EDNS0 expire
 	EDNS0EXPIRE      = 0x9     // EDNS0 expire
+	EDNS0COOKIE      = 0xa     // EDNS0 Cookie
 	EDNS0SUBNETDRAFT = 0x50fa  // Don't use! Use EDNS0SUBNET
 	EDNS0SUBNETDRAFT = 0x50fa  // Don't use! Use EDNS0SUBNET
 	EDNS0LOCALSTART  = 0xFDE9  // Beginning of range reserved for local/experimental use (RFC6891)
 	EDNS0LOCALSTART  = 0xFDE9  // Beginning of range reserved for local/experimental use (RFC6891)
 	EDNS0LOCALEND    = 0xFFFE  // End of range reserved for local/experimental use (RFC6891)
 	EDNS0LOCALEND    = 0xFFFE  // End of range reserved for local/experimental use (RFC6891)
@@ -56,6 +58,8 @@ func (rr *OPT) String() string {
 			if o.(*EDNS0_SUBNET).DraftOption {
 			if o.(*EDNS0_SUBNET).DraftOption {
 				s += " (draft)"
 				s += " (draft)"
 			}
 			}
+		case *EDNS0_COOKIE:
+			s += "\n; COOKIE: " + o.String()
 		case *EDNS0_UL:
 		case *EDNS0_UL:
 			s += "\n; UPDATE LEASE: " + o.String()
 			s += "\n; UPDATE LEASE: " + o.String()
 		case *EDNS0_LLQ:
 		case *EDNS0_LLQ:
@@ -96,13 +100,16 @@ func (rr *OPT) SetVersion(v uint8) {
 }
 }
 
 
 // ExtendedRcode returns the EDNS extended RCODE field (the upper 8 bits of the TTL).
 // ExtendedRcode returns the EDNS extended RCODE field (the upper 8 bits of the TTL).
-func (rr *OPT) ExtendedRcode() uint8 {
-	return uint8((rr.Hdr.Ttl & 0xFF000000) >> 24)
+func (rr *OPT) ExtendedRcode() int {
+	return int((rr.Hdr.Ttl&0xFF000000)>>24) + 15
 }
 }
 
 
 // SetExtendedRcode sets the EDNS extended RCODE field.
 // SetExtendedRcode sets the EDNS extended RCODE field.
 func (rr *OPT) SetExtendedRcode(v uint8) {
 func (rr *OPT) SetExtendedRcode(v uint8) {
-	rr.Hdr.Ttl = rr.Hdr.Ttl&0x00FFFFFF | (uint32(v) << 24)
+	if v < RcodeBadVers { // Smaller than 16.. Use the 4 bits you have!
+		return
+	}
+	rr.Hdr.Ttl = rr.Hdr.Ttl&0x00FFFFFF | (uint32(v-15) << 24)
 }
 }
 
 
 // UDPSize returns the UDP buffer size.
 // UDPSize returns the UDP buffer size.
@@ -121,12 +128,21 @@ func (rr *OPT) Do() bool {
 }
 }
 
 
 // SetDo sets the DO (DNSSEC OK) bit.
 // SetDo sets the DO (DNSSEC OK) bit.
-func (rr *OPT) SetDo() {
-	rr.Hdr.Ttl |= _DO
+// If we pass an argument, set the DO bit to that value.
+// It is possible to pass 2 or more arguments. Any arguments after the 1st is silently ignored.
+func (rr *OPT) SetDo(do ...bool) {
+	if len(do) == 1 {
+		if do[0] {
+			rr.Hdr.Ttl |= _DO
+		} else {
+			rr.Hdr.Ttl &^= _DO
+		}
+	} else {
+		rr.Hdr.Ttl |= _DO
+	}
 }
 }
 
 
-// EDNS0 defines an EDNS0 Option. An OPT RR can have multiple options appended to
-// it.
+// EDNS0 defines an EDNS0 Option. An OPT RR can have multiple options appended to it.
 type EDNS0 interface {
 type EDNS0 interface {
 	// Option returns the option code for the option.
 	// Option returns the option code for the option.
 	Option() uint16
 	Option() uint16
@@ -207,7 +223,7 @@ func (e *EDNS0_SUBNET) Option() uint16 {
 
 
 func (e *EDNS0_SUBNET) pack() ([]byte, error) {
 func (e *EDNS0_SUBNET) pack() ([]byte, error) {
 	b := make([]byte, 4)
 	b := make([]byte, 4)
-	b[0], b[1] = packUint16(e.Family)
+	binary.BigEndian.PutUint16(b[0:], e.Family)
 	b[2] = e.SourceNetmask
 	b[2] = e.SourceNetmask
 	b[3] = e.SourceScope
 	b[3] = e.SourceScope
 	switch e.Family {
 	switch e.Family {
@@ -241,7 +257,7 @@ func (e *EDNS0_SUBNET) unpack(b []byte) error {
 	if len(b) < 4 {
 	if len(b) < 4 {
 		return ErrBuf
 		return ErrBuf
 	}
 	}
-	e.Family, _ = unpackUint16(b, 0)
+	e.Family = binary.BigEndian.Uint16(b)
 	e.SourceNetmask = b[2]
 	e.SourceNetmask = b[2]
 	e.SourceScope = b[3]
 	e.SourceScope = b[3]
 	switch e.Family {
 	switch e.Family {
@@ -283,6 +299,41 @@ func (e *EDNS0_SUBNET) String() (s string) {
 	return
 	return
 }
 }
 
 
+// The Cookie EDNS0 option
+//
+//	o := new(dns.OPT)
+//	o.Hdr.Name = "."
+//	o.Hdr.Rrtype = dns.TypeOPT
+//	e := new(dns.EDNS0_COOKIE)
+//	e.Code = dns.EDNS0COOKIE
+//	e.Cookie = "24a5ac.."
+//	o.Option = append(o.Option, e)
+//
+// The Cookie field consists out of a client cookie (RFC 7873 Section 4), that is
+// always 8 bytes. It may then optionally be followed by the server cookie. The server
+// cookie is of variable length, 8 to a maximum of 32 bytes. In other words:
+//
+//	cCookie := o.Cookie[:16]
+//	sCookie := o.Cookie[16:]
+//
+// There is no guarantee that the Cookie string has a specific length.
+type EDNS0_COOKIE struct {
+	Code   uint16 // Always EDNS0COOKIE
+	Cookie string // Hex-encoded cookie data
+}
+
+func (e *EDNS0_COOKIE) pack() ([]byte, error) {
+	h, err := hex.DecodeString(e.Cookie)
+	if err != nil {
+		return nil, err
+	}
+	return h, nil
+}
+
+func (e *EDNS0_COOKIE) Option() uint16        { return EDNS0COOKIE }
+func (e *EDNS0_COOKIE) unpack(b []byte) error { e.Cookie = hex.EncodeToString(b); return nil }
+func (e *EDNS0_COOKIE) String() string        { return e.Cookie }
+
 // The EDNS0_UL (Update Lease) (draft RFC) option is used to tell the server to set
 // The EDNS0_UL (Update Lease) (draft RFC) option is used to tell the server to set
 // an expiration on an update RR. This is helpful for clients that cannot clean
 // an expiration on an update RR. This is helpful for clients that cannot clean
 // up after themselves. This is a draft RFC and more information can be found at
 // up after themselves. This is a draft RFC and more information can be found at
@@ -306,10 +357,7 @@ func (e *EDNS0_UL) String() string { return strconv.FormatUint(uint64(e.Lease),
 // Copied: http://golang.org/src/pkg/net/dnsmsg.go
 // Copied: http://golang.org/src/pkg/net/dnsmsg.go
 func (e *EDNS0_UL) pack() ([]byte, error) {
 func (e *EDNS0_UL) pack() ([]byte, error) {
 	b := make([]byte, 4)
 	b := make([]byte, 4)
-	b[0] = byte(e.Lease >> 24)
-	b[1] = byte(e.Lease >> 16)
-	b[2] = byte(e.Lease >> 8)
-	b[3] = byte(e.Lease)
+	binary.BigEndian.PutUint32(b, e.Lease)
 	return b, nil
 	return b, nil
 }
 }
 
 
@@ -317,7 +365,7 @@ func (e *EDNS0_UL) unpack(b []byte) error {
 	if len(b) < 4 {
 	if len(b) < 4 {
 		return ErrBuf
 		return ErrBuf
 	}
 	}
-	e.Lease = uint32(b[0])<<24 | uint32(b[1])<<16 | uint32(b[2])<<8 | uint32(b[3])
+	e.Lease = binary.BigEndian.Uint32(b)
 	return nil
 	return nil
 }
 }
 
 
@@ -336,21 +384,11 @@ func (e *EDNS0_LLQ) Option() uint16 { return EDNS0LLQ }
 
 
 func (e *EDNS0_LLQ) pack() ([]byte, error) {
 func (e *EDNS0_LLQ) pack() ([]byte, error) {
 	b := make([]byte, 18)
 	b := make([]byte, 18)
-	b[0], b[1] = packUint16(e.Version)
-	b[2], b[3] = packUint16(e.Opcode)
-	b[4], b[5] = packUint16(e.Error)
-	b[6] = byte(e.Id >> 56)
-	b[7] = byte(e.Id >> 48)
-	b[8] = byte(e.Id >> 40)
-	b[9] = byte(e.Id >> 32)
-	b[10] = byte(e.Id >> 24)
-	b[11] = byte(e.Id >> 16)
-	b[12] = byte(e.Id >> 8)
-	b[13] = byte(e.Id)
-	b[14] = byte(e.LeaseLife >> 24)
-	b[15] = byte(e.LeaseLife >> 16)
-	b[16] = byte(e.LeaseLife >> 8)
-	b[17] = byte(e.LeaseLife)
+	binary.BigEndian.PutUint16(b[0:], e.Version)
+	binary.BigEndian.PutUint16(b[2:], e.Opcode)
+	binary.BigEndian.PutUint16(b[4:], e.Error)
+	binary.BigEndian.PutUint64(b[6:], e.Id)
+	binary.BigEndian.PutUint32(b[14:], e.LeaseLife)
 	return b, nil
 	return b, nil
 }
 }
 
 
@@ -358,12 +396,11 @@ func (e *EDNS0_LLQ) unpack(b []byte) error {
 	if len(b) < 18 {
 	if len(b) < 18 {
 		return ErrBuf
 		return ErrBuf
 	}
 	}
-	e.Version, _ = unpackUint16(b, 0)
-	e.Opcode, _ = unpackUint16(b, 2)
-	e.Error, _ = unpackUint16(b, 4)
-	e.Id = uint64(b[6])<<56 | uint64(b[6+1])<<48 | uint64(b[6+2])<<40 |
-		uint64(b[6+3])<<32 | uint64(b[6+4])<<24 | uint64(b[6+5])<<16 | uint64(b[6+6])<<8 | uint64(b[6+7])
-	e.LeaseLife = uint32(b[14])<<24 | uint32(b[14+1])<<16 | uint32(b[14+2])<<8 | uint32(b[14+3])
+	e.Version = binary.BigEndian.Uint16(b[0:])
+	e.Opcode = binary.BigEndian.Uint16(b[2:])
+	e.Error = binary.BigEndian.Uint16(b[4:])
+	e.Id = binary.BigEndian.Uint64(b[6:])
+	e.LeaseLife = binary.BigEndian.Uint32(b[14:])
 	return nil
 	return nil
 }
 }
 
 
@@ -459,7 +496,7 @@ func (e *EDNS0_EXPIRE) unpack(b []byte) error {
 	if len(b) < 4 {
 	if len(b) < 4 {
 		return ErrBuf
 		return ErrBuf
 	}
 	}
-	e.Expire = uint32(b[0])<<24 | uint32(b[1])<<16 | uint32(b[2])<<8 | uint32(b[3])
+	e.Expire = binary.BigEndian.Uint32(b)
 	return nil
 	return nil
 }
 }
 
 

+ 0 - 48
vendor/github.com/miekg/dns/edns_test.go

@@ -1,48 +0,0 @@
-package dns
-
-import "testing"
-
-func TestOPTTtl(t *testing.T) {
-	e := &OPT{}
-	e.Hdr.Name = "."
-	e.Hdr.Rrtype = TypeOPT
-
-	if e.Do() {
-		t.Fail()
-	}
-
-	e.SetDo()
-	if !e.Do() {
-		t.Fail()
-	}
-
-	oldTtl := e.Hdr.Ttl
-
-	if e.Version() != 0 {
-		t.Fail()
-	}
-
-	e.SetVersion(42)
-	if e.Version() != 42 {
-		t.Fail()
-	}
-
-	e.SetVersion(0)
-	if e.Hdr.Ttl != oldTtl {
-		t.Fail()
-	}
-
-	if e.ExtendedRcode() != 0 {
-		t.Fail()
-	}
-
-	e.SetExtendedRcode(42)
-	if e.ExtendedRcode() != 42 {
-		t.Fail()
-	}
-
-	e.SetExtendedRcode(0)
-	if e.Hdr.Ttl != oldTtl {
-		t.Fail()
-	}
-}

+ 0 - 146
vendor/github.com/miekg/dns/example_test.go

@@ -1,146 +0,0 @@
-package dns_test
-
-import (
-	"errors"
-	"fmt"
-	"log"
-	"net"
-
-	"github.com/miekg/dns"
-)
-
-// Retrieve the MX records for miek.nl.
-func ExampleMX() {
-	config, _ := dns.ClientConfigFromFile("/etc/resolv.conf")
-	c := new(dns.Client)
-	m := new(dns.Msg)
-	m.SetQuestion("miek.nl.", dns.TypeMX)
-	m.RecursionDesired = true
-	r, _, err := c.Exchange(m, config.Servers[0]+":"+config.Port)
-	if err != nil {
-		return
-	}
-	if r.Rcode != dns.RcodeSuccess {
-		return
-	}
-	for _, a := range r.Answer {
-		if mx, ok := a.(*dns.MX); ok {
-			fmt.Printf("%s\n", mx.String())
-		}
-	}
-}
-
-// Retrieve the DNSKEY records of a zone and convert them
-// to DS records for SHA1, SHA256 and SHA384.
-func ExampleDS() {
-	config, _ := dns.ClientConfigFromFile("/etc/resolv.conf")
-	c := new(dns.Client)
-	m := new(dns.Msg)
-	zone := "miek.nl"
-	m.SetQuestion(dns.Fqdn(zone), dns.TypeDNSKEY)
-	m.SetEdns0(4096, true)
-	r, _, err := c.Exchange(m, config.Servers[0]+":"+config.Port)
-	if err != nil {
-		return
-	}
-	if r.Rcode != dns.RcodeSuccess {
-		return
-	}
-	for _, k := range r.Answer {
-		if key, ok := k.(*dns.DNSKEY); ok {
-			for _, alg := range []uint8{dns.SHA1, dns.SHA256, dns.SHA384} {
-				fmt.Printf("%s; %d\n", key.ToDS(alg).String(), key.Flags)
-			}
-		}
-	}
-}
-
-const TypeAPAIR = 0x0F99
-
-type APAIR struct {
-	addr [2]net.IP
-}
-
-func NewAPAIR() dns.PrivateRdata { return new(APAIR) }
-
-func (rd *APAIR) String() string { return rd.addr[0].String() + " " + rd.addr[1].String() }
-func (rd *APAIR) Parse(txt []string) error {
-	if len(txt) != 2 {
-		return errors.New("two addresses required for APAIR")
-	}
-	for i, s := range txt {
-		ip := net.ParseIP(s)
-		if ip == nil {
-			return errors.New("invalid IP in APAIR text representation")
-		}
-		rd.addr[i] = ip
-	}
-	return nil
-}
-
-func (rd *APAIR) Pack(buf []byte) (int, error) {
-	b := append([]byte(rd.addr[0]), []byte(rd.addr[1])...)
-	n := copy(buf, b)
-	if n != len(b) {
-		return n, dns.ErrBuf
-	}
-	return n, nil
-}
-
-func (rd *APAIR) Unpack(buf []byte) (int, error) {
-	ln := net.IPv4len * 2
-	if len(buf) != ln {
-		return 0, errors.New("invalid length of APAIR rdata")
-	}
-	cp := make([]byte, ln)
-	copy(cp, buf) // clone bytes to use them in IPs
-
-	rd.addr[0] = net.IP(cp[:3])
-	rd.addr[1] = net.IP(cp[4:])
-
-	return len(buf), nil
-}
-
-func (rd *APAIR) Copy(dest dns.PrivateRdata) error {
-	cp := make([]byte, rd.Len())
-	_, err := rd.Pack(cp)
-	if err != nil {
-		return err
-	}
-
-	d := dest.(*APAIR)
-	d.addr[0] = net.IP(cp[:3])
-	d.addr[1] = net.IP(cp[4:])
-	return nil
-}
-
-func (rd *APAIR) Len() int {
-	return net.IPv4len * 2
-}
-
-func ExamplePrivateHandle() {
-	dns.PrivateHandle("APAIR", TypeAPAIR, NewAPAIR)
-	defer dns.PrivateHandleRemove(TypeAPAIR)
-
-	rr, err := dns.NewRR("miek.nl. APAIR (1.2.3.4    1.2.3.5)")
-	if err != nil {
-		log.Fatal("could not parse APAIR record: ", err)
-	}
-	fmt.Println(rr)
-	// Output: miek.nl.	3600	IN	APAIR	1.2.3.4 1.2.3.5
-
-	m := new(dns.Msg)
-	m.Id = 12345
-	m.SetQuestion("miek.nl.", TypeAPAIR)
-	m.Answer = append(m.Answer, rr)
-
-	fmt.Println(m)
-	// ;; opcode: QUERY, status: NOERROR, id: 12345
-	// ;; flags: rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
-	//
-	// ;; QUESTION SECTION:
-	// ;miek.nl.	IN	 APAIR
-	//
-	// ;; ANSWER SECTION:
-	// miek.nl.	3600	IN	APAIR	1.2.3.4 1.2.3.5
-}

+ 0 - 9
vendor/github.com/miekg/dns/format.go

@@ -69,15 +69,6 @@ func Field(r RR, i int) string {
 				s += " " + Type(d.Index(i).Uint()).String()
 				s += " " + Type(d.Index(i).Uint()).String()
 			}
 			}
 			return s
 			return s
-		case `dns:"wks"`:
-			if d.Len() == 0 {
-				return ""
-			}
-			s := strconv.Itoa(int(d.Index(0).Uint()))
-			for i := 0; i < d.Len(); i++ {
-				s += " " + strconv.Itoa(int(d.Index(i).Uint()))
-			}
-			return s
 		default:
 		default:
 			// if it does not have a tag its a string slice
 			// if it does not have a tag its a string slice
 			fallthrough
 			fallthrough

+ 0 - 25
vendor/github.com/miekg/dns/fuzz_test.go

@@ -1,25 +0,0 @@
-package dns
-
-import "testing"
-
-func TestFuzzString(t *testing.T) {
-	testcases := []string{"", " MINFO ", "	RP ", "	NSEC 0 0", "	\" NSEC 0 0\"", "  \" MINFO \"",
-		";a ", ";a����������",
-		"	NSAP O ", "  NSAP N ",
-		" TYPE4 TYPE6a789a3bc0045c8a5fb42c7d1bd998f5444 IN 9579b47d46817afbd17273e6",
-		" TYPE45 3 3 4147994 TYPE\\(\\)\\)\\(\\)\\(\\(\\)\\(\\)\\)\\)\\(\\)\\(\\)\\(\\(\\R 948\"\")\\(\\)\\)\\)\\(\\ ",
-		"$GENERATE 0-3 ${441189,5039418474430,o}",
-		"$INCLUDE 00 TYPE00000000000n ",
-		"$INCLUDE PE4 TYPE061463623/727071511 \\(\\)\\$GENERATE 6-462/0",
-	}
-	for i, tc := range testcases {
-		rr, err := NewRR(tc)
-		if err == nil {
-			// rr can be nil because we can (for instance) just parse a comment
-			if rr == nil {
-				continue
-			}
-			t.Fatalf("parsed mailformed RR %d: %s", i, rr.String())
-		}
-	}
-}

+ 16 - 15
vendor/github.com/miekg/dns/zgenerate.go → vendor/github.com/miekg/dns/generate.go

@@ -2,6 +2,7 @@ package dns
 
 
 import (
 import (
 	"bytes"
 	"bytes"
+	"errors"
 	"fmt"
 	"fmt"
 	"strconv"
 	"strconv"
 	"strings"
 	"strings"
@@ -25,7 +26,7 @@ func generate(l lex, c chan lex, t chan *Token, o string) string {
 		if i+1 == len(l.token) {
 		if i+1 == len(l.token) {
 			return "bad step in $GENERATE range"
 			return "bad step in $GENERATE range"
 		}
 		}
-		if s, e := strconv.Atoi(l.token[i+1:]); e == nil {
+		if s, err := strconv.Atoi(l.token[i+1:]); err == nil {
 			if s < 0 {
 			if s < 0 {
 				return "bad step in $GENERATE range"
 				return "bad step in $GENERATE range"
 			}
 			}
@@ -65,7 +66,7 @@ BuildRR:
 			escape bool
 			escape bool
 			dom    bytes.Buffer
 			dom    bytes.Buffer
 			mod    string
 			mod    string
-			err    string
+			err    error
 			offset int
 			offset int
 		)
 		)
 
 
@@ -104,8 +105,8 @@ BuildRR:
 						return "bad modifier in $GENERATE"
 						return "bad modifier in $GENERATE"
 					}
 					}
 					mod, offset, err = modToPrintf(s[j+2 : j+2+sep])
 					mod, offset, err = modToPrintf(s[j+2 : j+2+sep])
-					if err != "" {
-						return err
+					if err != nil {
+						return err.Error()
 					}
 					}
 					j += 2 + sep // Jump to it
 					j += 2 + sep // Jump to it
 				}
 				}
@@ -119,9 +120,9 @@ BuildRR:
 			}
 			}
 		}
 		}
 		// Re-parse the RR and send it on the current channel t
 		// Re-parse the RR and send it on the current channel t
-		rx, e := NewRR("$ORIGIN " + o + "\n" + dom.String())
-		if e != nil {
-			return e.(*ParseError).err
+		rx, err := NewRR("$ORIGIN " + o + "\n" + dom.String())
+		if err != nil {
+			return err.Error()
 		}
 		}
 		t <- &Token{RR: rx}
 		t <- &Token{RR: rx}
 		// Its more efficient to first built the rrlist and then parse it in
 		// Its more efficient to first built the rrlist and then parse it in
@@ -131,28 +132,28 @@ BuildRR:
 }
 }
 
 
 // Convert a $GENERATE modifier 0,0,d to something Printf can deal with.
 // Convert a $GENERATE modifier 0,0,d to something Printf can deal with.
-func modToPrintf(s string) (string, int, string) {
+func modToPrintf(s string) (string, int, error) {
 	xs := strings.SplitN(s, ",", 3)
 	xs := strings.SplitN(s, ",", 3)
 	if len(xs) != 3 {
 	if len(xs) != 3 {
-		return "", 0, "bad modifier in $GENERATE"
+		return "", 0, errors.New("bad modifier in $GENERATE")
 	}
 	}
 	// xs[0] is offset, xs[1] is width, xs[2] is base
 	// xs[0] is offset, xs[1] is width, xs[2] is base
 	if xs[2] != "o" && xs[2] != "d" && xs[2] != "x" && xs[2] != "X" {
 	if xs[2] != "o" && xs[2] != "d" && xs[2] != "x" && xs[2] != "X" {
-		return "", 0, "bad base in $GENERATE"
+		return "", 0, errors.New("bad base in $GENERATE")
 	}
 	}
 	offset, err := strconv.Atoi(xs[0])
 	offset, err := strconv.Atoi(xs[0])
 	if err != nil || offset > 255 {
 	if err != nil || offset > 255 {
-		return "", 0, "bad offset in $GENERATE"
+		return "", 0, errors.New("bad offset in $GENERATE")
 	}
 	}
 	width, err := strconv.Atoi(xs[1])
 	width, err := strconv.Atoi(xs[1])
 	if err != nil || width > 255 {
 	if err != nil || width > 255 {
-		return "", offset, "bad width in $GENERATE"
+		return "", offset, errors.New("bad width in $GENERATE")
 	}
 	}
 	switch {
 	switch {
 	case width < 0:
 	case width < 0:
-		return "", offset, "bad width in $GENERATE"
+		return "", offset, errors.New("bad width in $GENERATE")
 	case width == 0:
 	case width == 0:
-		return "%" + xs[1] + xs[2], offset, ""
+		return "%" + xs[1] + xs[2], offset, nil
 	}
 	}
-	return "%0" + xs[1] + xs[2], offset, ""
+	return "%0" + xs[1] + xs[2], offset, nil
 }
 }

+ 0 - 2346
vendor/github.com/miekg/dns/idn/code_points.go

@@ -1,2346 +0,0 @@
-package idn
-
-const (
-	propertyUnknown    property = iota // unknown character property
-	propertyPVALID                     // allowed to be used in IDNs
-	propertyCONTEXTJ                   // invisible or problematic characters (join controls)
-	propertyCONTEXTO                   // invisible or problematic characters (others)
-	propertyDISALLOWED                 // should not be included in IDNs
-	propertyUNASSIGNED                 // code points that are not designated in the Unicode Standard
-)
-
-// property stores the property of a code point, as described in RFC 5892,
-// section 1
-type property int
-
-// codePoints list all code points in Unicode Character Database (UCD) Format
-// according to RFC 5892, appendix B.1. Thanks to libidn2 (GNU) -
-// http://www.gnu.org/software/libidn/libidn2/
-var codePoints = []struct {
-	start rune
-	end   rune
-	state property
-}{
-	{0x0000, 0x002C, propertyDISALLOWED},    // <control>..COMMA
-	{0x002D, 0x0, propertyPVALID},           // HYPHEN-MINUS
-	{0x002E, 0x002F, propertyDISALLOWED},    // FULL STOP..SOLIDUS
-	{0x0030, 0x0039, propertyPVALID},        // DIGIT ZERO..DIGIT NINE
-	{0x003A, 0x0060, propertyDISALLOWED},    // COLON..GRAVE ACCENT
-	{0x0041, 0x005A, propertyPVALID},        // LATIN CAPITAL LETTER A..LATIN CAPITAL LETTER Z
-	{0x0061, 0x007A, propertyPVALID},        // LATIN SMALL LETTER A..LATIN SMALL LETTER Z
-	{0x007B, 0x00B6, propertyDISALLOWED},    // LEFT CURLY BRACKET..PILCROW SIGN
-	{0x00B7, 0x0, propertyCONTEXTO},         // MIDDLE DOT
-	{0x00B8, 0x00DE, propertyDISALLOWED},    // CEDILLA..LATIN CAPITAL LETTER THORN
-	{0x00DF, 0x00F6, propertyPVALID},        // LATIN SMALL LETTER SHARP S..LATIN SMALL LETT
-	{0x00F7, 0x0, propertyDISALLOWED},       // DIVISION SIGN
-	{0x00F8, 0x00FF, propertyPVALID},        // LATIN SMALL LETTER O WITH STROKE..LATIN SMAL
-	{0x0100, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER A WITH MACRON
-	{0x0101, 0x0, propertyPVALID},           // LATIN SMALL LETTER A WITH MACRON
-	{0x0102, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER A WITH BREVE
-	{0x0103, 0x0, propertyPVALID},           // LATIN SMALL LETTER A WITH BREVE
-	{0x0104, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER A WITH OGONEK
-	{0x0105, 0x0, propertyPVALID},           // LATIN SMALL LETTER A WITH OGONEK
-	{0x0106, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER C WITH ACUTE
-	{0x0107, 0x0, propertyPVALID},           // LATIN SMALL LETTER C WITH ACUTE
-	{0x0108, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER C WITH CIRCUMFLEX
-	{0x0109, 0x0, propertyPVALID},           // LATIN SMALL LETTER C WITH CIRCUMFLEX
-	{0x010A, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER C WITH DOT ABOVE
-	{0x010B, 0x0, propertyPVALID},           // LATIN SMALL LETTER C WITH DOT ABOVE
-	{0x010C, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER C WITH CARON
-	{0x010D, 0x0, propertyPVALID},           // LATIN SMALL LETTER C WITH CARON
-	{0x010E, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER D WITH CARON
-	{0x010F, 0x0, propertyPVALID},           // LATIN SMALL LETTER D WITH CARON
-	{0x0110, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER D WITH STROKE
-	{0x0111, 0x0, propertyPVALID},           // LATIN SMALL LETTER D WITH STROKE
-	{0x0112, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER E WITH MACRON
-	{0x0113, 0x0, propertyPVALID},           // LATIN SMALL LETTER E WITH MACRON
-	{0x0114, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER E WITH BREVE
-	{0x0115, 0x0, propertyPVALID},           // LATIN SMALL LETTER E WITH BREVE
-	{0x0116, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER E WITH DOT ABOVE
-	{0x0117, 0x0, propertyPVALID},           // LATIN SMALL LETTER E WITH DOT ABOVE
-	{0x0118, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER E WITH OGONEK
-	{0x0119, 0x0, propertyPVALID},           // LATIN SMALL LETTER E WITH OGONEK
-	{0x011A, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER E WITH CARON
-	{0x011B, 0x0, propertyPVALID},           // LATIN SMALL LETTER E WITH CARON
-	{0x011C, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER G WITH CIRCUMFLEX
-	{0x011D, 0x0, propertyPVALID},           // LATIN SMALL LETTER G WITH CIRCUMFLEX
-	{0x011E, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER G WITH BREVE
-	{0x011F, 0x0, propertyPVALID},           // LATIN SMALL LETTER G WITH BREVE
-	{0x0120, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER G WITH DOT ABOVE
-	{0x0121, 0x0, propertyPVALID},           // LATIN SMALL LETTER G WITH DOT ABOVE
-	{0x0122, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER G WITH CEDILLA
-	{0x0123, 0x0, propertyPVALID},           // LATIN SMALL LETTER G WITH CEDILLA
-	{0x0124, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER H WITH CIRCUMFLEX
-	{0x0125, 0x0, propertyPVALID},           // LATIN SMALL LETTER H WITH CIRCUMFLEX
-	{0x0126, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER H WITH STROKE
-	{0x0127, 0x0, propertyPVALID},           // LATIN SMALL LETTER H WITH STROKE
-	{0x0128, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER I WITH TILDE
-	{0x0129, 0x0, propertyPVALID},           // LATIN SMALL LETTER I WITH TILDE
-	{0x012A, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER I WITH MACRON
-	{0x012B, 0x0, propertyPVALID},           // LATIN SMALL LETTER I WITH MACRON
-	{0x012C, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER I WITH BREVE
-	{0x012D, 0x0, propertyPVALID},           // LATIN SMALL LETTER I WITH BREVE
-	{0x012E, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER I WITH OGONEK
-	{0x012F, 0x0, propertyPVALID},           // LATIN SMALL LETTER I WITH OGONEK
-	{0x0130, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER I WITH DOT ABOVE
-	{0x0131, 0x0, propertyPVALID},           // LATIN SMALL LETTER DOTLESS I
-	{0x0132, 0x0134, propertyDISALLOWED},    // LATIN CAPITAL LIGATURE IJ..LATIN CAPITAL LET
-	{0x0135, 0x0, propertyPVALID},           // LATIN SMALL LETTER J WITH CIRCUMFLEX
-	{0x0136, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER K WITH CEDILLA
-	{0x0137, 0x0138, propertyPVALID},        // LATIN SMALL LETTER K WITH CEDILLA..LATIN SMA
-	{0x0139, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER L WITH ACUTE
-	{0x013A, 0x0, propertyPVALID},           // LATIN SMALL LETTER L WITH ACUTE
-	{0x013B, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER L WITH CEDILLA
-	{0x013C, 0x0, propertyPVALID},           // LATIN SMALL LETTER L WITH CEDILLA
-	{0x013D, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER L WITH CARON
-	{0x013E, 0x0, propertyPVALID},           // LATIN SMALL LETTER L WITH CARON
-	{0x013F, 0x0141, propertyDISALLOWED},    // LATIN CAPITAL LETTER L WITH MIDDLE DOT..LATI
-	{0x0142, 0x0, propertyPVALID},           // LATIN SMALL LETTER L WITH STROKE
-	{0x0143, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER N WITH ACUTE
-	{0x0144, 0x0, propertyPVALID},           // LATIN SMALL LETTER N WITH ACUTE
-	{0x0145, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER N WITH CEDILLA
-	{0x0146, 0x0, propertyPVALID},           // LATIN SMALL LETTER N WITH CEDILLA
-	{0x0147, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER N WITH CARON
-	{0x0148, 0x0, propertyPVALID},           // LATIN SMALL LETTER N WITH CARON
-	{0x0149, 0x014A, propertyDISALLOWED},    // LATIN SMALL LETTER N PRECEDED BY APOSTROPHE.
-	{0x014B, 0x0, propertyPVALID},           // LATIN SMALL LETTER ENG
-	{0x014C, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH MACRON
-	{0x014D, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH MACRON
-	{0x014E, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH BREVE
-	{0x014F, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH BREVE
-	{0x0150, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH DOUBLE ACUTE
-	{0x0151, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH DOUBLE ACUTE
-	{0x0152, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LIGATURE OE
-	{0x0153, 0x0, propertyPVALID},           // LATIN SMALL LIGATURE OE
-	{0x0154, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER R WITH ACUTE
-	{0x0155, 0x0, propertyPVALID},           // LATIN SMALL LETTER R WITH ACUTE
-	{0x0156, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER R WITH CEDILLA
-	{0x0157, 0x0, propertyPVALID},           // LATIN SMALL LETTER R WITH CEDILLA
-	{0x0158, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER R WITH CARON
-	{0x0159, 0x0, propertyPVALID},           // LATIN SMALL LETTER R WITH CARON
-	{0x015A, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER S WITH ACUTE
-	{0x015B, 0x0, propertyPVALID},           // LATIN SMALL LETTER S WITH ACUTE
-	{0x015C, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER S WITH CIRCUMFLEX
-	{0x015D, 0x0, propertyPVALID},           // LATIN SMALL LETTER S WITH CIRCUMFLEX
-	{0x015E, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER S WITH CEDILLA
-	{0x015F, 0x0, propertyPVALID},           // LATIN SMALL LETTER S WITH CEDILLA
-	{0x0160, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER S WITH CARON
-	{0x0161, 0x0, propertyPVALID},           // LATIN SMALL LETTER S WITH CARON
-	{0x0162, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER T WITH CEDILLA
-	{0x0163, 0x0, propertyPVALID},           // LATIN SMALL LETTER T WITH CEDILLA
-	{0x0164, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER T WITH CARON
-	{0x0165, 0x0, propertyPVALID},           // LATIN SMALL LETTER T WITH CARON
-	{0x0166, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER T WITH STROKE
-	{0x0167, 0x0, propertyPVALID},           // LATIN SMALL LETTER T WITH STROKE
-	{0x0168, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER U WITH TILDE
-	{0x0169, 0x0, propertyPVALID},           // LATIN SMALL LETTER U WITH TILDE
-	{0x016A, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER U WITH MACRON
-	{0x016B, 0x0, propertyPVALID},           // LATIN SMALL LETTER U WITH MACRON
-	{0x016C, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER U WITH BREVE
-	{0x016D, 0x0, propertyPVALID},           // LATIN SMALL LETTER U WITH BREVE
-	{0x016E, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER U WITH RING ABOVE
-	{0x016F, 0x0, propertyPVALID},           // LATIN SMALL LETTER U WITH RING ABOVE
-	{0x0170, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER U WITH DOUBLE ACUTE
-	{0x0171, 0x0, propertyPVALID},           // LATIN SMALL LETTER U WITH DOUBLE ACUTE
-	{0x0172, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER U WITH OGONEK
-	{0x0173, 0x0, propertyPVALID},           // LATIN SMALL LETTER U WITH OGONEK
-	{0x0174, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER W WITH CIRCUMFLEX
-	{0x0175, 0x0, propertyPVALID},           // LATIN SMALL LETTER W WITH CIRCUMFLEX
-	{0x0176, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER Y WITH CIRCUMFLEX
-	{0x0177, 0x0, propertyPVALID},           // LATIN SMALL LETTER Y WITH CIRCUMFLEX
-	{0x0178, 0x0179, propertyDISALLOWED},    // LATIN CAPITAL LETTER Y WITH DIAERESIS..LATIN
-	{0x017A, 0x0, propertyPVALID},           // LATIN SMALL LETTER Z WITH ACUTE
-	{0x017B, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER Z WITH DOT ABOVE
-	{0x017C, 0x0, propertyPVALID},           // LATIN SMALL LETTER Z WITH DOT ABOVE
-	{0x017D, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER Z WITH CARON
-	{0x017E, 0x0, propertyPVALID},           // LATIN SMALL LETTER Z WITH CARON
-	{0x017F, 0x0, propertyDISALLOWED},       // LATIN SMALL LETTER LONG S
-	{0x0180, 0x0, propertyPVALID},           // LATIN SMALL LETTER B WITH STROKE
-	{0x0181, 0x0182, propertyDISALLOWED},    // LATIN CAPITAL LETTER B WITH HOOK..LATIN CAPI
-	{0x0183, 0x0, propertyPVALID},           // LATIN SMALL LETTER B WITH TOPBAR
-	{0x0184, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER TONE SIX
-	{0x0185, 0x0, propertyPVALID},           // LATIN SMALL LETTER TONE SIX
-	{0x0186, 0x0187, propertyDISALLOWED},    // LATIN CAPITAL LETTER OPEN O..LATIN CAPITAL L
-	{0x0188, 0x0, propertyPVALID},           // LATIN SMALL LETTER C WITH HOOK
-	{0x0189, 0x018B, propertyDISALLOWED},    // LATIN CAPITAL LETTER AFRICAN D..LATIN CAPITA
-	{0x018C, 0x018D, propertyPVALID},        // LATIN SMALL LETTER D WITH TOPBAR..LATIN SMAL
-	{0x018E, 0x0191, propertyDISALLOWED},    // LATIN CAPITAL LETTER REVERSED E..LATIN CAPIT
-	{0x0192, 0x0, propertyPVALID},           // LATIN SMALL LETTER F WITH HOOK
-	{0x0193, 0x0194, propertyDISALLOWED},    // LATIN CAPITAL LETTER G WITH HOOK..LATIN CAPI
-	{0x0195, 0x0, propertyPVALID},           // LATIN SMALL LETTER HV
-	{0x0196, 0x0198, propertyDISALLOWED},    // LATIN CAPITAL LETTER IOTA..LATIN CAPITAL LET
-	{0x0199, 0x019B, propertyPVALID},        // LATIN SMALL LETTER K WITH HOOK..LATIN SMALL
-	{0x019C, 0x019D, propertyDISALLOWED},    // LATIN CAPITAL LETTER TURNED M..LATIN CAPITAL
-	{0x019E, 0x0, propertyPVALID},           // LATIN SMALL LETTER N WITH LONG RIGHT LEG
-	{0x019F, 0x01A0, propertyDISALLOWED},    // LATIN CAPITAL LETTER O WITH MIDDLE TILDE..LA
-	{0x01A1, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH HORN
-	{0x01A2, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER OI
-	{0x01A3, 0x0, propertyPVALID},           // LATIN SMALL LETTER OI
-	{0x01A4, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER P WITH HOOK
-	{0x01A5, 0x0, propertyPVALID},           // LATIN SMALL LETTER P WITH HOOK
-	{0x01A6, 0x01A7, propertyDISALLOWED},    // LATIN LETTER YR..LATIN CAPITAL LETTER TONE T
-	{0x01A8, 0x0, propertyPVALID},           // LATIN SMALL LETTER TONE TWO
-	{0x01A9, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER ESH
-	{0x01AA, 0x01AB, propertyPVALID},        // LATIN LETTER REVERSED ESH LOOP..LATIN SMALL
-	{0x01AC, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER T WITH HOOK
-	{0x01AD, 0x0, propertyPVALID},           // LATIN SMALL LETTER T WITH HOOK
-	{0x01AE, 0x01AF, propertyDISALLOWED},    // LATIN CAPITAL LETTER T WITH RETROFLEX HOOK..
-	{0x01B0, 0x0, propertyPVALID},           // LATIN SMALL LETTER U WITH HORN
-	{0x01B1, 0x01B3, propertyDISALLOWED},    // LATIN CAPITAL LETTER UPSILON..LATIN CAPITAL
-	{0x01B4, 0x0, propertyPVALID},           // LATIN SMALL LETTER Y WITH HOOK
-	{0x01B5, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER Z WITH STROKE
-	{0x01B6, 0x0, propertyPVALID},           // LATIN SMALL LETTER Z WITH STROKE
-	{0x01B7, 0x01B8, propertyDISALLOWED},    // LATIN CAPITAL LETTER EZH..LATIN CAPITAL LETT
-	{0x01B9, 0x01BB, propertyPVALID},        // LATIN SMALL LETTER EZH REVERSED..LATIN LETTE
-	{0x01BC, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER TONE FIVE
-	{0x01BD, 0x01C3, propertyPVALID},        // LATIN SMALL LETTER TONE FIVE..LATIN LETTER R
-	{0x01C4, 0x01CD, propertyDISALLOWED},    // LATIN CAPITAL LETTER DZ WITH CARON..LATIN CA
-	{0x01CE, 0x0, propertyPVALID},           // LATIN SMALL LETTER A WITH CARON
-	{0x01CF, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER I WITH CARON
-	{0x01D0, 0x0, propertyPVALID},           // LATIN SMALL LETTER I WITH CARON
-	{0x01D1, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH CARON
-	{0x01D2, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH CARON
-	{0x01D3, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER U WITH CARON
-	{0x01D4, 0x0, propertyPVALID},           // LATIN SMALL LETTER U WITH CARON
-	{0x01D5, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER U WITH DIAERESIS AND MA
-	{0x01D6, 0x0, propertyPVALID},           // LATIN SMALL LETTER U WITH DIAERESIS AND MACR
-	{0x01D7, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER U WITH DIAERESIS AND AC
-	{0x01D8, 0x0, propertyPVALID},           // LATIN SMALL LETTER U WITH DIAERESIS AND ACUT
-	{0x01D9, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER U WITH DIAERESIS AND CA
-	{0x01DA, 0x0, propertyPVALID},           // LATIN SMALL LETTER U WITH DIAERESIS AND CARO
-	{0x01DB, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER U WITH DIAERESIS AND GR
-	{0x01DC, 0x01DD, propertyPVALID},        // LATIN SMALL LETTER U WITH DIAERESIS AND GRAV
-	{0x01DE, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER A WITH DIAERESIS AND MA
-	{0x01DF, 0x0, propertyPVALID},           // LATIN SMALL LETTER A WITH DIAERESIS AND MACR
-	{0x01E0, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER A WITH DOT ABOVE AND MA
-	{0x01E1, 0x0, propertyPVALID},           // LATIN SMALL LETTER A WITH DOT ABOVE AND MACR
-	{0x01E2, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER AE WITH MACRON
-	{0x01E3, 0x0, propertyPVALID},           // LATIN SMALL LETTER AE WITH MACRON
-	{0x01E4, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER G WITH STROKE
-	{0x01E5, 0x0, propertyPVALID},           // LATIN SMALL LETTER G WITH STROKE
-	{0x01E6, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER G WITH CARON
-	{0x01E7, 0x0, propertyPVALID},           // LATIN SMALL LETTER G WITH CARON
-	{0x01E8, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER K WITH CARON
-	{0x01E9, 0x0, propertyPVALID},           // LATIN SMALL LETTER K WITH CARON
-	{0x01EA, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH OGONEK
-	{0x01EB, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH OGONEK
-	{0x01EC, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH OGONEK AND MACRO
-	{0x01ED, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH OGONEK AND MACRON
-	{0x01EE, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER EZH WITH CARON
-	{0x01EF, 0x01F0, propertyPVALID},        // LATIN SMALL LETTER EZH WITH CARON..LATIN SMA
-	{0x01F1, 0x01F4, propertyDISALLOWED},    // LATIN CAPITAL LETTER DZ..LATIN CAPITAL LETTE
-	{0x01F5, 0x0, propertyPVALID},           // LATIN SMALL LETTER G WITH ACUTE
-	{0x01F6, 0x01F8, propertyDISALLOWED},    // LATIN CAPITAL LETTER HWAIR..LATIN CAPITAL LE
-	{0x01F9, 0x0, propertyPVALID},           // LATIN SMALL LETTER N WITH GRAVE
-	{0x01FA, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER A WITH RING ABOVE AND A
-	{0x01FB, 0x0, propertyPVALID},           // LATIN SMALL LETTER A WITH RING ABOVE AND ACU
-	{0x01FC, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER AE WITH ACUTE
-	{0x01FD, 0x0, propertyPVALID},           // LATIN SMALL LETTER AE WITH ACUTE
-	{0x01FE, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH STROKE AND ACUTE
-	{0x01FF, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH STROKE AND ACUTE
-	{0x0200, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER A WITH DOUBLE GRAVE
-	{0x0201, 0x0, propertyPVALID},           // LATIN SMALL LETTER A WITH DOUBLE GRAVE
-	{0x0202, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER A WITH INVERTED BREVE
-	{0x0203, 0x0, propertyPVALID},           // LATIN SMALL LETTER A WITH INVERTED BREVE
-	{0x0204, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER E WITH DOUBLE GRAVE
-	{0x0205, 0x0, propertyPVALID},           // LATIN SMALL LETTER E WITH DOUBLE GRAVE
-	{0x0206, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER E WITH INVERTED BREVE
-	{0x0207, 0x0, propertyPVALID},           // LATIN SMALL LETTER E WITH INVERTED BREVE
-	{0x0208, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER I WITH DOUBLE GRAVE
-	{0x0209, 0x0, propertyPVALID},           // LATIN SMALL LETTER I WITH DOUBLE GRAVE
-	{0x020A, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER I WITH INVERTED BREVE
-	{0x020B, 0x0, propertyPVALID},           // LATIN SMALL LETTER I WITH INVERTED BREVE
-	{0x020C, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH DOUBLE GRAVE
-	{0x020D, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH DOUBLE GRAVE
-	{0x020E, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH INVERTED BREVE
-	{0x020F, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH INVERTED BREVE
-	{0x0210, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER R WITH DOUBLE GRAVE
-	{0x0211, 0x0, propertyPVALID},           // LATIN SMALL LETTER R WITH DOUBLE GRAVE
-	{0x0212, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER R WITH INVERTED BREVE
-	{0x0213, 0x0, propertyPVALID},           // LATIN SMALL LETTER R WITH INVERTED BREVE
-	{0x0214, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER U WITH DOUBLE GRAVE
-	{0x0215, 0x0, propertyPVALID},           // LATIN SMALL LETTER U WITH DOUBLE GRAVE
-	{0x0216, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER U WITH INVERTED BREVE
-	{0x0217, 0x0, propertyPVALID},           // LATIN SMALL LETTER U WITH INVERTED BREVE
-	{0x0218, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER S WITH COMMA BELOW
-	{0x0219, 0x0, propertyPVALID},           // LATIN SMALL LETTER S WITH COMMA BELOW
-	{0x021A, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER T WITH COMMA BELOW
-	{0x021B, 0x0, propertyPVALID},           // LATIN SMALL LETTER T WITH COMMA BELOW
-	{0x021C, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER YOGH
-	{0x021D, 0x0, propertyPVALID},           // LATIN SMALL LETTER YOGH
-	{0x021E, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER H WITH CARON
-	{0x021F, 0x0, propertyPVALID},           // LATIN SMALL LETTER H WITH CARON
-	{0x0220, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER N WITH LONG RIGHT LEG
-	{0x0221, 0x0, propertyPVALID},           // LATIN SMALL LETTER D WITH CURL
-	{0x0222, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER OU
-	{0x0223, 0x0, propertyPVALID},           // LATIN SMALL LETTER OU
-	{0x0224, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER Z WITH HOOK
-	{0x0225, 0x0, propertyPVALID},           // LATIN SMALL LETTER Z WITH HOOK
-	{0x0226, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER A WITH DOT ABOVE
-	{0x0227, 0x0, propertyPVALID},           // LATIN SMALL LETTER A WITH DOT ABOVE
-	{0x0228, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER E WITH CEDILLA
-	{0x0229, 0x0, propertyPVALID},           // LATIN SMALL LETTER E WITH CEDILLA
-	{0x022A, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH DIAERESIS AND MA
-	{0x022B, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH DIAERESIS AND MACR
-	{0x022C, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH TILDE AND MACRON
-	{0x022D, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH TILDE AND MACRON
-	{0x022E, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH DOT ABOVE
-	{0x022F, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH DOT ABOVE
-	{0x0230, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH DOT ABOVE AND MA
-	{0x0231, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH DOT ABOVE AND MACR
-	{0x0232, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER Y WITH MACRON
-	{0x0233, 0x0239, propertyPVALID},        // LATIN SMALL LETTER Y WITH MACRON..LATIN SMAL
-	{0x023A, 0x023B, propertyDISALLOWED},    // LATIN CAPITAL LETTER A WITH STROKE..LATIN CA
-	{0x023C, 0x0, propertyPVALID},           // LATIN SMALL LETTER C WITH STROKE
-	{0x023D, 0x023E, propertyDISALLOWED},    // LATIN CAPITAL LETTER L WITH BAR..LATIN CAPIT
-	{0x023F, 0x0240, propertyPVALID},        // LATIN SMALL LETTER S WITH SWASH TAIL..LATIN
-	{0x0241, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER GLOTTAL STOP
-	{0x0242, 0x0, propertyPVALID},           // LATIN SMALL LETTER GLOTTAL STOP
-	{0x0243, 0x0246, propertyDISALLOWED},    // LATIN CAPITAL LETTER B WITH STROKE..LATIN CA
-	{0x0247, 0x0, propertyPVALID},           // LATIN SMALL LETTER E WITH STROKE
-	{0x0248, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER J WITH STROKE
-	{0x0249, 0x0, propertyPVALID},           // LATIN SMALL LETTER J WITH STROKE
-	{0x024A, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER SMALL Q WITH HOOK TAIL
-	{0x024B, 0x0, propertyPVALID},           // LATIN SMALL LETTER Q WITH HOOK TAIL
-	{0x024C, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER R WITH STROKE
-	{0x024D, 0x0, propertyPVALID},           // LATIN SMALL LETTER R WITH STROKE
-	{0x024E, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER Y WITH STROKE
-	{0x024F, 0x02AF, propertyPVALID},        // LATIN SMALL LETTER Y WITH STROKE..LATIN SMAL
-	{0x02B0, 0x02B8, propertyDISALLOWED},    // MODIFIER LETTER SMALL H..MODIFIER LETTER SMA
-	{0x02B9, 0x02C1, propertyPVALID},        // MODIFIER LETTER PRIME..MODIFIER LETTER REVER
-	{0x02C2, 0x02C5, propertyDISALLOWED},    // MODIFIER LETTER LEFT ARROWHEAD..MODIFIER LET
-	{0x02C6, 0x02D1, propertyPVALID},        // MODIFIER LETTER CIRCUMFLEX ACCENT..MODIFIER
-	{0x02D2, 0x02EB, propertyDISALLOWED},    // MODIFIER LETTER CENTRED RIGHT HALF RING..MOD
-	{0x02EC, 0x0, propertyPVALID},           // MODIFIER LETTER VOICING
-	{0x02ED, 0x0, propertyDISALLOWED},       // MODIFIER LETTER UNASPIRATED
-	{0x02EE, 0x0, propertyPVALID},           // MODIFIER LETTER DOUBLE APOSTROPHE
-	{0x02EF, 0x02FF, propertyDISALLOWED},    // MODIFIER LETTER LOW DOWN ARROWHEAD..MODIFIER
-	{0x0300, 0x033F, propertyPVALID},        // COMBINING GRAVE ACCENT..COMBINING DOUBLE OVE
-	{0x0340, 0x0341, propertyDISALLOWED},    // COMBINING GRAVE TONE MARK..COMBINING ACUTE T
-	{0x0342, 0x0, propertyPVALID},           // COMBINING GREEK PERISPOMENI
-	{0x0343, 0x0345, propertyDISALLOWED},    // COMBINING GREEK KORONIS..COMBINING GREEK YPO
-	{0x0346, 0x034E, propertyPVALID},        // COMBINING BRIDGE ABOVE..COMBINING UPWARDS AR
-	{0x034F, 0x0, propertyDISALLOWED},       // COMBINING GRAPHEME JOINER
-	{0x0350, 0x036F, propertyPVALID},        // COMBINING RIGHT ARROWHEAD ABOVE..COMBINING L
-	{0x0370, 0x0, propertyDISALLOWED},       // GREEK CAPITAL LETTER HETA
-	{0x0371, 0x0, propertyPVALID},           // GREEK SMALL LETTER HETA
-	{0x0372, 0x0, propertyDISALLOWED},       // GREEK CAPITAL LETTER ARCHAIC SAMPI
-	{0x0373, 0x0, propertyPVALID},           // GREEK SMALL LETTER ARCHAIC SAMPI
-	{0x0374, 0x0, propertyDISALLOWED},       // GREEK NUMERAL SIGN
-	{0x0375, 0x0, propertyCONTEXTO},         // GREEK LOWER NUMERAL SIGN
-	{0x0376, 0x0, propertyDISALLOWED},       // GREEK CAPITAL LETTER PAMPHYLIAN DIGAMMA
-	{0x0377, 0x0, propertyPVALID},           // GREEK SMALL LETTER PAMPHYLIAN DIGAMMA
-	{0x0378, 0x0379, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x037A, 0x0, propertyDISALLOWED},       // GREEK YPOGEGRAMMENI
-	{0x037B, 0x037D, propertyPVALID},        // GREEK SMALL REVERSED LUNATE SIGMA SYMBOL..GR
-	{0x037E, 0x0, propertyDISALLOWED},       // GREEK QUESTION MARK
-	{0x037F, 0x0383, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0384, 0x038A, propertyDISALLOWED},    // GREEK TONOS..GREEK CAPITAL LETTER IOTA WITH
-	{0x038B, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x038C, 0x0, propertyDISALLOWED},       // GREEK CAPITAL LETTER OMICRON WITH TONOS
-	{0x038D, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x038E, 0x038F, propertyDISALLOWED},    // GREEK CAPITAL LETTER UPSILON WITH TONOS..GRE
-	{0x0390, 0x0, propertyPVALID},           // GREEK SMALL LETTER IOTA WITH DIALYTIKA AND T
-	{0x0391, 0x03A1, propertyDISALLOWED},    // GREEK CAPITAL LETTER ALPHA..GREEK CAPITAL LE
-	{0x03A2, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x03A3, 0x03AB, propertyDISALLOWED},    // GREEK CAPITAL LETTER SIGMA..GREEK CAPITAL LE
-	{0x03AC, 0x03CE, propertyPVALID},        // GREEK SMALL LETTER ALPHA WITH TONOS..GREEK S
-	{0x03CF, 0x03D6, propertyDISALLOWED},    // GREEK CAPITAL KAI SYMBOL..GREEK PI SYMBOL
-	{0x03D7, 0x0, propertyPVALID},           // GREEK KAI SYMBOL
-	{0x03D8, 0x0, propertyDISALLOWED},       // GREEK LETTER ARCHAIC KOPPA
-	{0x03D9, 0x0, propertyPVALID},           // GREEK SMALL LETTER ARCHAIC KOPPA
-	{0x03DA, 0x0, propertyDISALLOWED},       // GREEK LETTER STIGMA
-	{0x03DB, 0x0, propertyPVALID},           // GREEK SMALL LETTER STIGMA
-	{0x03DC, 0x0, propertyDISALLOWED},       // GREEK LETTER DIGAMMA
-	{0x03DD, 0x0, propertyPVALID},           // GREEK SMALL LETTER DIGAMMA
-	{0x03DE, 0x0, propertyDISALLOWED},       // GREEK LETTER KOPPA
-	{0x03DF, 0x0, propertyPVALID},           // GREEK SMALL LETTER KOPPA
-	{0x03E0, 0x0, propertyDISALLOWED},       // GREEK LETTER SAMPI
-	{0x03E1, 0x0, propertyPVALID},           // GREEK SMALL LETTER SAMPI
-	{0x03E2, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER SHEI
-	{0x03E3, 0x0, propertyPVALID},           // COPTIC SMALL LETTER SHEI
-	{0x03E4, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER FEI
-	{0x03E5, 0x0, propertyPVALID},           // COPTIC SMALL LETTER FEI
-	{0x03E6, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER KHEI
-	{0x03E7, 0x0, propertyPVALID},           // COPTIC SMALL LETTER KHEI
-	{0x03E8, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER HORI
-	{0x03E9, 0x0, propertyPVALID},           // COPTIC SMALL LETTER HORI
-	{0x03EA, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER GANGIA
-	{0x03EB, 0x0, propertyPVALID},           // COPTIC SMALL LETTER GANGIA
-	{0x03EC, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER SHIMA
-	{0x03ED, 0x0, propertyPVALID},           // COPTIC SMALL LETTER SHIMA
-	{0x03EE, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER DEI
-	{0x03EF, 0x0, propertyPVALID},           // COPTIC SMALL LETTER DEI
-	{0x03F0, 0x03F2, propertyDISALLOWED},    // GREEK KAPPA SYMBOL..GREEK LUNATE SIGMA SYMBO
-	{0x03F3, 0x0, propertyPVALID},           // GREEK LETTER YOT
-	{0x03F4, 0x03F7, propertyDISALLOWED},    // GREEK CAPITAL THETA SYMBOL..GREEK CAPITAL LE
-	{0x03F8, 0x0, propertyPVALID},           // GREEK SMALL LETTER SHO
-	{0x03F9, 0x03FA, propertyDISALLOWED},    // GREEK CAPITAL LUNATE SIGMA SYMBOL..GREEK CAP
-	{0x03FB, 0x03FC, propertyPVALID},        // GREEK SMALL LETTER SAN..GREEK RHO WITH STROK
-	{0x03FD, 0x042F, propertyDISALLOWED},    // GREEK CAPITAL REVERSED LUNATE SIGMA SYMBOL..
-	{0x0430, 0x045F, propertyPVALID},        // CYRILLIC SMALL LETTER A..CYRILLIC SMALL LETT
-	{0x0460, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER OMEGA
-	{0x0461, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER OMEGA
-	{0x0462, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER YAT
-	{0x0463, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER YAT
-	{0x0464, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER IOTIFIED E
-	{0x0465, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER IOTIFIED E
-	{0x0466, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER LITTLE YUS
-	{0x0467, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER LITTLE YUS
-	{0x0468, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER IOTIFIED LITTLE YUS
-	{0x0469, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER IOTIFIED LITTLE YUS
-	{0x046A, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER BIG YUS
-	{0x046B, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER BIG YUS
-	{0x046C, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER IOTIFIED BIG YUS
-	{0x046D, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER IOTIFIED BIG YUS
-	{0x046E, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER KSI
-	{0x046F, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER KSI
-	{0x0470, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER PSI
-	{0x0471, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER PSI
-	{0x0472, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER FITA
-	{0x0473, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER FITA
-	{0x0474, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER IZHITSA
-	{0x0475, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER IZHITSA
-	{0x0476, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER IZHITSA WITH DOUBLE
-	{0x0477, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER IZHITSA WITH DOUBLE GR
-	{0x0478, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER UK
-	{0x0479, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER UK
-	{0x047A, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER ROUND OMEGA
-	{0x047B, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER ROUND OMEGA
-	{0x047C, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER OMEGA WITH TITLO
-	{0x047D, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER OMEGA WITH TITLO
-	{0x047E, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER OT
-	{0x047F, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER OT
-	{0x0480, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER KOPPA
-	{0x0481, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER KOPPA
-	{0x0482, 0x0, propertyDISALLOWED},       // CYRILLIC THOUSANDS SIGN
-	{0x0483, 0x0487, propertyPVALID},        // COMBINING CYRILLIC TITLO..COMBINING CYRILLIC
-	{0x0488, 0x048A, propertyDISALLOWED},    // COMBINING CYRILLIC HUNDRED THOUSANDS SIGN..C
-	{0x048B, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER SHORT I WITH TAIL
-	{0x048C, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER SEMISOFT SIGN
-	{0x048D, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER SEMISOFT SIGN
-	{0x048E, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER ER WITH TICK
-	{0x048F, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER ER WITH TICK
-	{0x0490, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER GHE WITH UPTURN
-	{0x0491, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER GHE WITH UPTURN
-	{0x0492, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER GHE WITH STROKE
-	{0x0493, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER GHE WITH STROKE
-	{0x0494, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER GHE WITH MIDDLE HOOK
-	{0x0495, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER GHE WITH MIDDLE HOOK
-	{0x0496, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER
-	{0x0497, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER ZHE WITH DESCENDER
-	{0x0498, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER ZE WITH DESCENDER
-	{0x0499, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER ZE WITH DESCENDER
-	{0x049A, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER KA WITH DESCENDER
-	{0x049B, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER KA WITH DESCENDER
-	{0x049C, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER KA WITH VERTICAL STR
-	{0x049D, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER KA WITH VERTICAL STROK
-	{0x049E, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER KA WITH STROKE
-	{0x049F, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER KA WITH STROKE
-	{0x04A0, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER BASHKIR KA
-	{0x04A1, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER BASHKIR KA
-	{0x04A2, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER EN WITH DESCENDER
-	{0x04A3, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER EN WITH DESCENDER
-	{0x04A4, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LIGATURE EN GHE
-	{0x04A5, 0x0, propertyPVALID},           // CYRILLIC SMALL LIGATURE EN GHE
-	{0x04A6, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER PE WITH MIDDLE HOOK
-	{0x04A7, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER PE WITH MIDDLE HOOK
-	{0x04A8, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER ABKHASIAN HA
-	{0x04A9, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER ABKHASIAN HA
-	{0x04AA, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER ES WITH DESCENDER
-	{0x04AB, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER ES WITH DESCENDER
-	{0x04AC, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER TE WITH DESCENDER
-	{0x04AD, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER TE WITH DESCENDER
-	{0x04AE, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER STRAIGHT U
-	{0x04AF, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER STRAIGHT U
-	{0x04B0, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER STRAIGHT U WITH STRO
-	{0x04B1, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE
-	{0x04B2, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER HA WITH DESCENDER
-	{0x04B3, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER HA WITH DESCENDER
-	{0x04B4, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LIGATURE TE TSE
-	{0x04B5, 0x0, propertyPVALID},           // CYRILLIC SMALL LIGATURE TE TSE
-	{0x04B6, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER CHE WITH DESCENDER
-	{0x04B7, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER CHE WITH DESCENDER
-	{0x04B8, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER CHE WITH VERTICAL ST
-	{0x04B9, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER CHE WITH VERTICAL STRO
-	{0x04BA, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER SHHA
-	{0x04BB, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER SHHA
-	{0x04BC, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER ABKHASIAN CHE
-	{0x04BD, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER ABKHASIAN CHE
-	{0x04BE, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER ABKHASIAN CHE WITH D
-	{0x04BF, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER ABKHASIAN CHE WITH DES
-	{0x04C0, 0x04C1, propertyDISALLOWED},    // CYRILLIC LETTER PALOCHKA..CYRILLIC CAPITAL L
-	{0x04C2, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER ZHE WITH BREVE
-	{0x04C3, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER KA WITH HOOK
-	{0x04C4, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER KA WITH HOOK
-	{0x04C5, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER EL WITH TAIL
-	{0x04C6, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER EL WITH TAIL
-	{0x04C7, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER EN WITH HOOK
-	{0x04C8, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER EN WITH HOOK
-	{0x04C9, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER EN WITH TAIL
-	{0x04CA, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER EN WITH TAIL
-	{0x04CB, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER KHAKASSIAN CHE
-	{0x04CC, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER KHAKASSIAN CHE
-	{0x04CD, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER EM WITH TAIL
-	{0x04CE, 0x04CF, propertyPVALID},        // CYRILLIC SMALL LETTER EM WITH TAIL..CYRILLIC
-	{0x04D0, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER A WITH BREVE
-	{0x04D1, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER A WITH BREVE
-	{0x04D2, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER A WITH DIAERESIS
-	{0x04D3, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER A WITH DIAERESIS
-	{0x04D4, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LIGATURE A IE
-	{0x04D5, 0x0, propertyPVALID},           // CYRILLIC SMALL LIGATURE A IE
-	{0x04D6, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER IE WITH BREVE
-	{0x04D7, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER IE WITH BREVE
-	{0x04D8, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER SCHWA
-	{0x04D9, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER SCHWA
-	{0x04DA, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER SCHWA WITH DIAERESIS
-	{0x04DB, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER SCHWA WITH DIAERESIS
-	{0x04DC, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER ZHE WITH DIAERESIS
-	{0x04DD, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER ZHE WITH DIAERESIS
-	{0x04DE, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER ZE WITH DIAERESIS
-	{0x04DF, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER ZE WITH DIAERESIS
-	{0x04E0, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER ABKHASIAN DZE
-	{0x04E1, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER ABKHASIAN DZE
-	{0x04E2, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER I WITH MACRON
-	{0x04E3, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER I WITH MACRON
-	{0x04E4, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER I WITH DIAERESIS
-	{0x04E5, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER I WITH DIAERESIS
-	{0x04E6, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER O WITH DIAERESIS
-	{0x04E7, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER O WITH DIAERESIS
-	{0x04E8, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER BARRED O
-	{0x04E9, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER BARRED O
-	{0x04EA, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER BARRED O WITH DIAERE
-	{0x04EB, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER BARRED O WITH DIAERESI
-	{0x04EC, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER E WITH DIAERESIS
-	{0x04ED, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER E WITH DIAERESIS
-	{0x04EE, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER U WITH MACRON
-	{0x04EF, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER U WITH MACRON
-	{0x04F0, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER U WITH DIAERESIS
-	{0x04F1, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER U WITH DIAERESIS
-	{0x04F2, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER U WITH DOUBLE ACUTE
-	{0x04F3, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER U WITH DOUBLE ACUTE
-	{0x04F4, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER CHE WITH DIAERESIS
-	{0x04F5, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER CHE WITH DIAERESIS
-	{0x04F6, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER GHE WITH DESCENDER
-	{0x04F7, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER GHE WITH DESCENDER
-	{0x04F8, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER YERU WITH DIAERESIS
-	{0x04F9, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER YERU WITH DIAERESIS
-	{0x04FA, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER GHE WITH STROKE AND
-	{0x04FB, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER GHE WITH STROKE AND HO
-	{0x04FC, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER HA WITH HOOK
-	{0x04FD, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER HA WITH HOOK
-	{0x04FE, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER HA WITH STROKE
-	{0x04FF, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER HA WITH STROKE
-	{0x0500, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER KOMI DE
-	{0x0501, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER KOMI DE
-	{0x0502, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER KOMI DJE
-	{0x0503, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER KOMI DJE
-	{0x0504, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER KOMI ZJE
-	{0x0505, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER KOMI ZJE
-	{0x0506, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER KOMI DZJE
-	{0x0507, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER KOMI DZJE
-	{0x0508, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER KOMI LJE
-	{0x0509, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER KOMI LJE
-	{0x050A, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER KOMI NJE
-	{0x050B, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER KOMI NJE
-	{0x050C, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER KOMI SJE
-	{0x050D, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER KOMI SJE
-	{0x050E, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER KOMI TJE
-	{0x050F, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER KOMI TJE
-	{0x0510, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER REVERSED ZE
-	{0x0511, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER REVERSED ZE
-	{0x0512, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER EL WITH HOOK
-	{0x0513, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER EL WITH HOOK
-	{0x0514, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER LHA
-	{0x0515, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER LHA
-	{0x0516, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER RHA
-	{0x0517, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER RHA
-	{0x0518, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER YAE
-	{0x0519, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER YAE
-	{0x051A, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER QA
-	{0x051B, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER QA
-	{0x051C, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER WE
-	{0x051D, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER WE
-	{0x051E, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER ALEUT KA
-	{0x051F, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER ALEUT KA
-	{0x0520, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER EL WITH MIDDLE HOOK
-	{0x0521, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER EL WITH MIDDLE HOOK
-	{0x0522, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER EN WITH MIDDLE HOOK
-	{0x0523, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER EN WITH MIDDLE HOOK
-	{0x0524, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER PE WITH DESCENDER
-	{0x0525, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER PE WITH DESCENDER
-	{0x0526, 0x0530, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0531, 0x0556, propertyDISALLOWED},    // ARMENIAN CAPITAL LETTER AYB..ARMENIAN CAPITA
-	{0x0557, 0x0558, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0559, 0x0, propertyPVALID},           // ARMENIAN MODIFIER LETTER LEFT HALF RING
-	{0x055A, 0x055F, propertyDISALLOWED},    // ARMENIAN APOSTROPHE..ARMENIAN ABBREVIATION M
-	{0x0560, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0561, 0x0586, propertyPVALID},        // ARMENIAN SMALL LETTER AYB..ARMENIAN SMALL LE
-	{0x0587, 0x0, propertyDISALLOWED},       // ARMENIAN SMALL LIGATURE ECH YIWN
-	{0x0588, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0589, 0x058A, propertyDISALLOWED},    // ARMENIAN FULL STOP..ARMENIAN HYPHEN
-	{0x058B, 0x0590, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0591, 0x05BD, propertyPVALID},        // HEBREW ACCENT ETNAHTA..HEBREW POINT METEG
-	{0x05BE, 0x0, propertyDISALLOWED},       // HEBREW PUNCTUATION MAQAF
-	{0x05BF, 0x0, propertyPVALID},           // HEBREW POINT RAFE
-	{0x05C0, 0x0, propertyDISALLOWED},       // HEBREW PUNCTUATION PASEQ
-	{0x05C1, 0x05C2, propertyPVALID},        // HEBREW POINT SHIN DOT..HEBREW POINT SIN DOT
-	{0x05C3, 0x0, propertyDISALLOWED},       // HEBREW PUNCTUATION SOF PASUQ
-	{0x05C4, 0x05C5, propertyPVALID},        // HEBREW MARK UPPER DOT..HEBREW MARK LOWER DOT
-	{0x05C6, 0x0, propertyDISALLOWED},       // HEBREW PUNCTUATION NUN HAFUKHA
-	{0x05C7, 0x0, propertyPVALID},           // HEBREW POINT QAMATS QATAN
-	{0x05C8, 0x05CF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x05D0, 0x05EA, propertyPVALID},        // HEBREW LETTER ALEF..HEBREW LETTER TAV
-	{0x05EB, 0x05EF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x05F0, 0x05F2, propertyPVALID},        // HEBREW LIGATURE YIDDISH DOUBLE VAV..HEBREW L
-	{0x05F3, 0x05F4, propertyCONTEXTO},      // HEBREW PUNCTUATION GERESH..HEBREW PUNCTUATIO
-	{0x05F5, 0x05FF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0600, 0x0603, propertyDISALLOWED},    // ARABIC NUMBER SIGN..ARABIC SIGN SAFHA
-	{0x0604, 0x0605, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0606, 0x060F, propertyDISALLOWED},    // ARABIC-INDIC CUBE ROOT..ARABIC SIGN MISRA
-	{0x0610, 0x061A, propertyPVALID},        // ARABIC SIGN SALLALLAHOU ALAYHE WASSALLAM..AR
-	{0x061B, 0x0, propertyDISALLOWED},       // ARABIC SEMICOLON
-	{0x061C, 0x061D, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x061E, 0x061F, propertyDISALLOWED},    // ARABIC TRIPLE DOT PUNCTUATION MARK..ARABIC Q
-	{0x0620, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0621, 0x063F, propertyPVALID},        // ARABIC LETTER HAMZA..ARABIC LETTER FARSI YEH
-	{0x0640, 0x0, propertyDISALLOWED},       // ARABIC TATWEEL
-	{0x0641, 0x065E, propertyPVALID},        // ARABIC LETTER FEH..ARABIC FATHA WITH TWO DOT
-	{0x065F, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0660, 0x0669, propertyCONTEXTO},      // ARABIC-INDIC DIGIT ZERO..ARABIC-INDIC DIGIT
-	{0x066A, 0x066D, propertyDISALLOWED},    // ARABIC PERCENT SIGN..ARABIC FIVE POINTED STA
-	{0x066E, 0x0674, propertyPVALID},        // ARABIC LETTER DOTLESS BEH..ARABIC LETTER HIG
-	{0x0675, 0x0678, propertyDISALLOWED},    // ARABIC LETTER HIGH HAMZA ALEF..ARABIC LETTER
-	{0x0679, 0x06D3, propertyPVALID},        // ARABIC LETTER TTEH..ARABIC LETTER YEH BARREE
-	{0x06D4, 0x0, propertyDISALLOWED},       // ARABIC FULL STOP
-	{0x06D5, 0x06DC, propertyPVALID},        // ARABIC LETTER AE..ARABIC SMALL HIGH SEEN
-	{0x06DD, 0x06DE, propertyDISALLOWED},    // ARABIC END OF AYAH..ARABIC START OF RUB EL H
-	{0x06DF, 0x06E8, propertyPVALID},        // ARABIC SMALL HIGH ROUNDED ZERO..ARABIC SMALL
-	{0x06E9, 0x0, propertyDISALLOWED},       // ARABIC PLACE OF SAJDAH
-	{0x06EA, 0x06EF, propertyPVALID},        // ARABIC EMPTY CENTRE LOW STOP..ARABIC LETTER
-	{0x06F0, 0x06F9, propertyCONTEXTO},      // EXTENDED ARABIC-INDIC DIGIT ZERO..EXTENDED A
-	{0x06FA, 0x06FF, propertyPVALID},        // ARABIC LETTER SHEEN WITH DOT BELOW..ARABIC L
-	{0x0700, 0x070D, propertyDISALLOWED},    // SYRIAC END OF PARAGRAPH..SYRIAC HARKLEAN AST
-	{0x070E, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x070F, 0x0, propertyDISALLOWED},       // SYRIAC ABBREVIATION MARK
-	{0x0710, 0x074A, propertyPVALID},        // SYRIAC LETTER ALAPH..SYRIAC BARREKH
-	{0x074B, 0x074C, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x074D, 0x07B1, propertyPVALID},        // SYRIAC LETTER SOGDIAN ZHAIN..THAANA LETTER N
-	{0x07B2, 0x07BF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x07C0, 0x07F5, propertyPVALID},        // NKO DIGIT ZERO..NKO LOW TONE APOSTROPHE
-	{0x07F6, 0x07FA, propertyDISALLOWED},    // NKO SYMBOL OO DENNEN..NKO LAJANYALAN
-	{0x07FB, 0x07FF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0800, 0x082D, propertyPVALID},        // SAMARITAN LETTER ALAF..SAMARITAN MARK NEQUDA
-	{0x082E, 0x082F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0830, 0x083E, propertyDISALLOWED},    // SAMARITAN PUNCTUATION NEQUDAA..SAMARITAN PUN
-	{0x083F, 0x08FF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0900, 0x0939, propertyPVALID},        // DEVANAGARI SIGN INVERTED CANDRABINDU..DEVANA
-	{0x093A, 0x093B, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x093C, 0x094E, propertyPVALID},        // DEVANAGARI SIGN NUKTA..DEVANAGARI VOWEL SIGN
-	{0x094F, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0950, 0x0955, propertyPVALID},        // DEVANAGARI OM..DEVANAGARI VOWEL SIGN CANDRA
-	{0x0956, 0x0957, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0958, 0x095F, propertyDISALLOWED},    // DEVANAGARI LETTER QA..DEVANAGARI LETTER YYA
-	{0x0960, 0x0963, propertyPVALID},        // DEVANAGARI LETTER VOCALIC RR..DEVANAGARI VOW
-	{0x0964, 0x0965, propertyDISALLOWED},    // DEVANAGARI DANDA..DEVANAGARI DOUBLE DANDA
-	{0x0966, 0x096F, propertyPVALID},        // DEVANAGARI DIGIT ZERO..DEVANAGARI DIGIT NINE
-	{0x0970, 0x0, propertyDISALLOWED},       // DEVANAGARI ABBREVIATION SIGN
-	{0x0971, 0x0972, propertyPVALID},        // DEVANAGARI SIGN HIGH SPACING DOT..DEVANAGARI
-	{0x0973, 0x0978, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0979, 0x097F, propertyPVALID},        // DEVANAGARI LETTER ZHA..DEVANAGARI LETTER BBA
-	{0x0980, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0981, 0x0983, propertyPVALID},        // BENGALI SIGN CANDRABINDU..BENGALI SIGN VISAR
-	{0x0984, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0985, 0x098C, propertyPVALID},        // BENGALI LETTER A..BENGALI LETTER VOCALIC L
-	{0x098D, 0x098E, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x098F, 0x0990, propertyPVALID},        // BENGALI LETTER E..BENGALI LETTER AI
-	{0x0991, 0x0992, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0993, 0x09A8, propertyPVALID},        // BENGALI LETTER O..BENGALI LETTER NA
-	{0x09A9, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x09AA, 0x09B0, propertyPVALID},        // BENGALI LETTER PA..BENGALI LETTER RA
-	{0x09B1, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x09B2, 0x0, propertyPVALID},           // BENGALI LETTER LA
-	{0x09B3, 0x09B5, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x09B6, 0x09B9, propertyPVALID},        // BENGALI LETTER SHA..BENGALI LETTER HA
-	{0x09BA, 0x09BB, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x09BC, 0x09C4, propertyPVALID},        // BENGALI SIGN NUKTA..BENGALI VOWEL SIGN VOCAL
-	{0x09C5, 0x09C6, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x09C7, 0x09C8, propertyPVALID},        // BENGALI VOWEL SIGN E..BENGALI VOWEL SIGN AI
-	{0x09C9, 0x09CA, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x09CB, 0x09CE, propertyPVALID},        // BENGALI VOWEL SIGN O..BENGALI LETTER KHANDA
-	{0x09CF, 0x09D6, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x09D7, 0x0, propertyPVALID},           // BENGALI AU LENGTH MARK
-	{0x09D8, 0x09DB, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x09DC, 0x09DD, propertyDISALLOWED},    // BENGALI LETTER RRA..BENGALI LETTER RHA
-	{0x09DE, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x09DF, 0x0, propertyDISALLOWED},       // BENGALI LETTER YYA
-	{0x09E0, 0x09E3, propertyPVALID},        // BENGALI LETTER VOCALIC RR..BENGALI VOWEL SIG
-	{0x09E4, 0x09E5, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x09E6, 0x09F1, propertyPVALID},        // BENGALI DIGIT ZERO..BENGALI LETTER RA WITH L
-	{0x09F2, 0x09FB, propertyDISALLOWED},    // BENGALI RUPEE MARK..BENGALI GANDA MARK
-	{0x09FC, 0x0A00, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0A01, 0x0A03, propertyPVALID},        // GURMUKHI SIGN ADAK BINDI..GURMUKHI SIGN VISA
-	{0x0A04, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0A05, 0x0A0A, propertyPVALID},        // GURMUKHI LETTER A..GURMUKHI LETTER UU
-	{0x0A0B, 0x0A0E, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0A0F, 0x0A10, propertyPVALID},        // GURMUKHI LETTER EE..GURMUKHI LETTER AI
-	{0x0A11, 0x0A12, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0A13, 0x0A28, propertyPVALID},        // GURMUKHI LETTER OO..GURMUKHI LETTER NA
-	{0x0A29, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0A2A, 0x0A30, propertyPVALID},        // GURMUKHI LETTER PA..GURMUKHI LETTER RA
-	{0x0A31, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0A32, 0x0, propertyPVALID},           // GURMUKHI LETTER LA
-	{0x0A33, 0x0, propertyDISALLOWED},       // GURMUKHI LETTER LLA
-	{0x0A34, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0A35, 0x0, propertyPVALID},           // GURMUKHI LETTER VA
-	{0x0A36, 0x0, propertyDISALLOWED},       // GURMUKHI LETTER SHA
-	{0x0A37, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0A38, 0x0A39, propertyPVALID},        // GURMUKHI LETTER SA..GURMUKHI LETTER HA
-	{0x0A3A, 0x0A3B, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0A3C, 0x0, propertyPVALID},           // GURMUKHI SIGN NUKTA
-	{0x0A3D, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0A3E, 0x0A42, propertyPVALID},        // GURMUKHI VOWEL SIGN AA..GURMUKHI VOWEL SIGN
-	{0x0A43, 0x0A46, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0A47, 0x0A48, propertyPVALID},        // GURMUKHI VOWEL SIGN EE..GURMUKHI VOWEL SIGN
-	{0x0A49, 0x0A4A, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0A4B, 0x0A4D, propertyPVALID},        // GURMUKHI VOWEL SIGN OO..GURMUKHI SIGN VIRAMA
-	{0x0A4E, 0x0A50, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0A51, 0x0, propertyPVALID},           // GURMUKHI SIGN UDAAT
-	{0x0A52, 0x0A58, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0A59, 0x0A5B, propertyDISALLOWED},    // GURMUKHI LETTER KHHA..GURMUKHI LETTER ZA
-	{0x0A5C, 0x0, propertyPVALID},           // GURMUKHI LETTER RRA
-	{0x0A5D, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0A5E, 0x0, propertyDISALLOWED},       // GURMUKHI LETTER FA
-	{0x0A5F, 0x0A65, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0A66, 0x0A75, propertyPVALID},        // GURMUKHI DIGIT ZERO..GURMUKHI SIGN YAKASH
-	{0x0A76, 0x0A80, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0A81, 0x0A83, propertyPVALID},        // GUJARATI SIGN CANDRABINDU..GUJARATI SIGN VIS
-	{0x0A84, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0A85, 0x0A8D, propertyPVALID},        // GUJARATI LETTER A..GUJARATI VOWEL CANDRA E
-	{0x0A8E, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0A8F, 0x0A91, propertyPVALID},        // GUJARATI LETTER E..GUJARATI VOWEL CANDRA O
-	{0x0A92, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0A93, 0x0AA8, propertyPVALID},        // GUJARATI LETTER O..GUJARATI LETTER NA
-	{0x0AA9, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0AAA, 0x0AB0, propertyPVALID},        // GUJARATI LETTER PA..GUJARATI LETTER RA
-	{0x0AB1, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0AB2, 0x0AB3, propertyPVALID},        // GUJARATI LETTER LA..GUJARATI LETTER LLA
-	{0x0AB4, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0AB5, 0x0AB9, propertyPVALID},        // GUJARATI LETTER VA..GUJARATI LETTER HA
-	{0x0ABA, 0x0ABB, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0ABC, 0x0AC5, propertyPVALID},        // GUJARATI SIGN NUKTA..GUJARATI VOWEL SIGN CAN
-	{0x0AC6, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0AC7, 0x0AC9, propertyPVALID},        // GUJARATI VOWEL SIGN E..GUJARATI VOWEL SIGN C
-	{0x0ACA, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0ACB, 0x0ACD, propertyPVALID},        // GUJARATI VOWEL SIGN O..GUJARATI SIGN VIRAMA
-	{0x0ACE, 0x0ACF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0AD0, 0x0, propertyPVALID},           // GUJARATI OM
-	{0x0AD1, 0x0ADF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0AE0, 0x0AE3, propertyPVALID},        // GUJARATI LETTER VOCALIC RR..GUJARATI VOWEL S
-	{0x0AE4, 0x0AE5, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0AE6, 0x0AEF, propertyPVALID},        // GUJARATI DIGIT ZERO..GUJARATI DIGIT NINE
-	{0x0AF0, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0AF1, 0x0, propertyDISALLOWED},       // GUJARATI RUPEE SIGN
-	{0x0AF2, 0x0B00, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0B01, 0x0B03, propertyPVALID},        // ORIYA SIGN CANDRABINDU..ORIYA SIGN VISARGA
-	{0x0B04, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0B05, 0x0B0C, propertyPVALID},        // ORIYA LETTER A..ORIYA LETTER VOCALIC L
-	{0x0B0D, 0x0B0E, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0B0F, 0x0B10, propertyPVALID},        // ORIYA LETTER E..ORIYA LETTER AI
-	{0x0B11, 0x0B12, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0B13, 0x0B28, propertyPVALID},        // ORIYA LETTER O..ORIYA LETTER NA
-	{0x0B29, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0B2A, 0x0B30, propertyPVALID},        // ORIYA LETTER PA..ORIYA LETTER RA
-	{0x0B31, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0B32, 0x0B33, propertyPVALID},        // ORIYA LETTER LA..ORIYA LETTER LLA
-	{0x0B34, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0B35, 0x0B39, propertyPVALID},        // ORIYA LETTER VA..ORIYA LETTER HA
-	{0x0B3A, 0x0B3B, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0B3C, 0x0B44, propertyPVALID},        // ORIYA SIGN NUKTA..ORIYA VOWEL SIGN VOCALIC R
-	{0x0B45, 0x0B46, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0B47, 0x0B48, propertyPVALID},        // ORIYA VOWEL SIGN E..ORIYA VOWEL SIGN AI
-	{0x0B49, 0x0B4A, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0B4B, 0x0B4D, propertyPVALID},        // ORIYA VOWEL SIGN O..ORIYA SIGN VIRAMA
-	{0x0B4E, 0x0B55, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0B56, 0x0B57, propertyPVALID},        // ORIYA AI LENGTH MARK..ORIYA AU LENGTH MARK
-	{0x0B58, 0x0B5B, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0B5C, 0x0B5D, propertyDISALLOWED},    // ORIYA LETTER RRA..ORIYA LETTER RHA
-	{0x0B5E, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0B5F, 0x0B63, propertyPVALID},        // ORIYA LETTER YYA..ORIYA VOWEL SIGN VOCALIC L
-	{0x0B64, 0x0B65, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0B66, 0x0B6F, propertyPVALID},        // ORIYA DIGIT ZERO..ORIYA DIGIT NINE
-	{0x0B70, 0x0, propertyDISALLOWED},       // ORIYA ISSHAR
-	{0x0B71, 0x0, propertyPVALID},           // ORIYA LETTER WA
-	{0x0B72, 0x0B81, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0B82, 0x0B83, propertyPVALID},        // TAMIL SIGN ANUSVARA..TAMIL SIGN VISARGA
-	{0x0B84, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0B85, 0x0B8A, propertyPVALID},        // TAMIL LETTER A..TAMIL LETTER UU
-	{0x0B8B, 0x0B8D, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0B8E, 0x0B90, propertyPVALID},        // TAMIL LETTER E..TAMIL LETTER AI
-	{0x0B91, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0B92, 0x0B95, propertyPVALID},        // TAMIL LETTER O..TAMIL LETTER KA
-	{0x0B96, 0x0B98, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0B99, 0x0B9A, propertyPVALID},        // TAMIL LETTER NGA..TAMIL LETTER CA
-	{0x0B9B, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0B9C, 0x0, propertyPVALID},           // TAMIL LETTER JA
-	{0x0B9D, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0B9E, 0x0B9F, propertyPVALID},        // TAMIL LETTER NYA..TAMIL LETTER TTA
-	{0x0BA0, 0x0BA2, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0BA3, 0x0BA4, propertyPVALID},        // TAMIL LETTER NNA..TAMIL LETTER TA
-	{0x0BA5, 0x0BA7, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0BA8, 0x0BAA, propertyPVALID},        // TAMIL LETTER NA..TAMIL LETTER PA
-	{0x0BAB, 0x0BAD, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0BAE, 0x0BB9, propertyPVALID},        // TAMIL LETTER MA..TAMIL LETTER HA
-	{0x0BBA, 0x0BBD, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0BBE, 0x0BC2, propertyPVALID},        // TAMIL VOWEL SIGN AA..TAMIL VOWEL SIGN UU
-	{0x0BC3, 0x0BC5, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0BC6, 0x0BC8, propertyPVALID},        // TAMIL VOWEL SIGN E..TAMIL VOWEL SIGN AI
-	{0x0BC9, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0BCA, 0x0BCD, propertyPVALID},        // TAMIL VOWEL SIGN O..TAMIL SIGN VIRAMA
-	{0x0BCE, 0x0BCF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0BD0, 0x0, propertyPVALID},           // TAMIL OM
-	{0x0BD1, 0x0BD6, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0BD7, 0x0, propertyPVALID},           // TAMIL AU LENGTH MARK
-	{0x0BD8, 0x0BE5, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0BE6, 0x0BEF, propertyPVALID},        // TAMIL DIGIT ZERO..TAMIL DIGIT NINE
-	{0x0BF0, 0x0BFA, propertyDISALLOWED},    // TAMIL NUMBER TEN..TAMIL NUMBER SIGN
-	{0x0BFB, 0x0C00, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0C01, 0x0C03, propertyPVALID},        // TELUGU SIGN CANDRABINDU..TELUGU SIGN VISARGA
-	{0x0C04, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0C05, 0x0C0C, propertyPVALID},        // TELUGU LETTER A..TELUGU LETTER VOCALIC L
-	{0x0C0D, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0C0E, 0x0C10, propertyPVALID},        // TELUGU LETTER E..TELUGU LETTER AI
-	{0x0C11, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0C12, 0x0C28, propertyPVALID},        // TELUGU LETTER O..TELUGU LETTER NA
-	{0x0C29, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0C2A, 0x0C33, propertyPVALID},        // TELUGU LETTER PA..TELUGU LETTER LLA
-	{0x0C34, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0C35, 0x0C39, propertyPVALID},        // TELUGU LETTER VA..TELUGU LETTER HA
-	{0x0C3A, 0x0C3C, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0C3D, 0x0C44, propertyPVALID},        // TELUGU SIGN AVAGRAHA..TELUGU VOWEL SIGN VOCA
-	{0x0C45, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0C46, 0x0C48, propertyPVALID},        // TELUGU VOWEL SIGN E..TELUGU VOWEL SIGN AI
-	{0x0C49, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0C4A, 0x0C4D, propertyPVALID},        // TELUGU VOWEL SIGN O..TELUGU SIGN VIRAMA
-	{0x0C4E, 0x0C54, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0C55, 0x0C56, propertyPVALID},        // TELUGU LENGTH MARK..TELUGU AI LENGTH MARK
-	{0x0C57, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0C58, 0x0C59, propertyPVALID},        // TELUGU LETTER TSA..TELUGU LETTER DZA
-	{0x0C5A, 0x0C5F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0C60, 0x0C63, propertyPVALID},        // TELUGU LETTER VOCALIC RR..TELUGU VOWEL SIGN
-	{0x0C64, 0x0C65, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0C66, 0x0C6F, propertyPVALID},        // TELUGU DIGIT ZERO..TELUGU DIGIT NINE
-	{0x0C70, 0x0C77, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0C78, 0x0C7F, propertyDISALLOWED},    // TELUGU FRACTION DIGIT ZERO FOR ODD POWERS OF
-	{0x0C80, 0x0C81, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0C82, 0x0C83, propertyPVALID},        // KANNADA SIGN ANUSVARA..KANNADA SIGN VISARGA
-	{0x0C84, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0C85, 0x0C8C, propertyPVALID},        // KANNADA LETTER A..KANNADA LETTER VOCALIC L
-	{0x0C8D, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0C8E, 0x0C90, propertyPVALID},        // KANNADA LETTER E..KANNADA LETTER AI
-	{0x0C91, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0C92, 0x0CA8, propertyPVALID},        // KANNADA LETTER O..KANNADA LETTER NA
-	{0x0CA9, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0CAA, 0x0CB3, propertyPVALID},        // KANNADA LETTER PA..KANNADA LETTER LLA
-	{0x0CB4, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0CB5, 0x0CB9, propertyPVALID},        // KANNADA LETTER VA..KANNADA LETTER HA
-	{0x0CBA, 0x0CBB, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0CBC, 0x0CC4, propertyPVALID},        // KANNADA SIGN NUKTA..KANNADA VOWEL SIGN VOCAL
-	{0x0CC5, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0CC6, 0x0CC8, propertyPVALID},        // KANNADA VOWEL SIGN E..KANNADA VOWEL SIGN AI
-	{0x0CC9, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0CCA, 0x0CCD, propertyPVALID},        // KANNADA VOWEL SIGN O..KANNADA SIGN VIRAMA
-	{0x0CCE, 0x0CD4, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0CD5, 0x0CD6, propertyPVALID},        // KANNADA LENGTH MARK..KANNADA AI LENGTH MARK
-	{0x0CD7, 0x0CDD, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0CDE, 0x0, propertyPVALID},           // KANNADA LETTER FA
-	{0x0CDF, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0CE0, 0x0CE3, propertyPVALID},        // KANNADA LETTER VOCALIC RR..KANNADA VOWEL SIG
-	{0x0CE4, 0x0CE5, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0CE6, 0x0CEF, propertyPVALID},        // KANNADA DIGIT ZERO..KANNADA DIGIT NINE
-	{0x0CF0, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0CF1, 0x0CF2, propertyDISALLOWED},    // KANNADA SIGN JIHVAMULIYA..KANNADA SIGN UPADH
-	{0x0CF3, 0x0D01, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0D02, 0x0D03, propertyPVALID},        // MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISA
-	{0x0D04, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0D05, 0x0D0C, propertyPVALID},        // MALAYALAM LETTER A..MALAYALAM LETTER VOCALIC
-	{0x0D0D, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0D0E, 0x0D10, propertyPVALID},        // MALAYALAM LETTER E..MALAYALAM LETTER AI
-	{0x0D11, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0D12, 0x0D28, propertyPVALID},        // MALAYALAM LETTER O..MALAYALAM LETTER NA
-	{0x0D29, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0D2A, 0x0D39, propertyPVALID},        // MALAYALAM LETTER PA..MALAYALAM LETTER HA
-	{0x0D3A, 0x0D3C, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0D3D, 0x0D44, propertyPVALID},        // MALAYALAM SIGN AVAGRAHA..MALAYALAM VOWEL SIG
-	{0x0D45, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0D46, 0x0D48, propertyPVALID},        // MALAYALAM VOWEL SIGN E..MALAYALAM VOWEL SIGN
-	{0x0D49, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0D4A, 0x0D4D, propertyPVALID},        // MALAYALAM VOWEL SIGN O..MALAYALAM SIGN VIRAM
-	{0x0D4E, 0x0D56, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0D57, 0x0, propertyPVALID},           // MALAYALAM AU LENGTH MARK
-	{0x0D58, 0x0D5F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0D60, 0x0D63, propertyPVALID},        // MALAYALAM LETTER VOCALIC RR..MALAYALAM VOWEL
-	{0x0D64, 0x0D65, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0D66, 0x0D6F, propertyPVALID},        // MALAYALAM DIGIT ZERO..MALAYALAM DIGIT NINE
-	{0x0D70, 0x0D75, propertyDISALLOWED},    // MALAYALAM NUMBER TEN..MALAYALAM FRACTION THR
-	{0x0D76, 0x0D78, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0D79, 0x0, propertyDISALLOWED},       // MALAYALAM DATE MARK
-	{0x0D7A, 0x0D7F, propertyPVALID},        // MALAYALAM LETTER CHILLU NN..MALAYALAM LETTER
-	{0x0D80, 0x0D81, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0D82, 0x0D83, propertyPVALID},        // SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARG
-	{0x0D84, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0D85, 0x0D96, propertyPVALID},        // SINHALA LETTER AYANNA..SINHALA LETTER AUYANN
-	{0x0D97, 0x0D99, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0D9A, 0x0DB1, propertyPVALID},        // SINHALA LETTER ALPAPRAANA KAYANNA..SINHALA L
-	{0x0DB2, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0DB3, 0x0DBB, propertyPVALID},        // SINHALA LETTER SANYAKA DAYANNA..SINHALA LETT
-	{0x0DBC, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0DBD, 0x0, propertyPVALID},           // SINHALA LETTER DANTAJA LAYANNA
-	{0x0DBE, 0x0DBF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0DC0, 0x0DC6, propertyPVALID},        // SINHALA LETTER VAYANNA..SINHALA LETTER FAYAN
-	{0x0DC7, 0x0DC9, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0DCA, 0x0, propertyPVALID},           // SINHALA SIGN AL-LAKUNA
-	{0x0DCB, 0x0DCE, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0DCF, 0x0DD4, propertyPVALID},        // SINHALA VOWEL SIGN AELA-PILLA..SINHALA VOWEL
-	{0x0DD5, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0DD6, 0x0, propertyPVALID},           // SINHALA VOWEL SIGN DIGA PAA-PILLA
-	{0x0DD7, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0DD8, 0x0DDF, propertyPVALID},        // SINHALA VOWEL SIGN GAETTA-PILLA..SINHALA VOW
-	{0x0DE0, 0x0DF1, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0DF2, 0x0DF3, propertyPVALID},        // SINHALA VOWEL SIGN DIGA GAETTA-PILLA..SINHAL
-	{0x0DF4, 0x0, propertyDISALLOWED},       // SINHALA PUNCTUATION KUNDDALIYA
-	{0x0DF5, 0x0E00, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0E01, 0x0E32, propertyPVALID},        // THAI CHARACTER KO KAI..THAI CHARACTER SARA A
-	{0x0E33, 0x0, propertyDISALLOWED},       // THAI CHARACTER SARA AM
-	{0x0E34, 0x0E3A, propertyPVALID},        // THAI CHARACTER SARA I..THAI CHARACTER PHINTH
-	{0x0E3B, 0x0E3E, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0E3F, 0x0, propertyDISALLOWED},       // THAI CURRENCY SYMBOL BAHT
-	{0x0E40, 0x0E4E, propertyPVALID},        // THAI CHARACTER SARA E..THAI CHARACTER YAMAKK
-	{0x0E4F, 0x0, propertyDISALLOWED},       // THAI CHARACTER FONGMAN
-	{0x0E50, 0x0E59, propertyPVALID},        // THAI DIGIT ZERO..THAI DIGIT NINE
-	{0x0E5A, 0x0E5B, propertyDISALLOWED},    // THAI CHARACTER ANGKHANKHU..THAI CHARACTER KH
-	{0x0E5C, 0x0E80, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0E81, 0x0E82, propertyPVALID},        // LAO LETTER KO..LAO LETTER KHO SUNG
-	{0x0E83, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0E84, 0x0, propertyPVALID},           // LAO LETTER KHO TAM
-	{0x0E85, 0x0E86, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0E87, 0x0E88, propertyPVALID},        // LAO LETTER NGO..LAO LETTER CO
-	{0x0E89, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0E8A, 0x0, propertyPVALID},           // LAO LETTER SO TAM
-	{0x0E8B, 0x0E8C, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0E8D, 0x0, propertyPVALID},           // LAO LETTER NYO
-	{0x0E8E, 0x0E93, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0E94, 0x0E97, propertyPVALID},        // LAO LETTER DO..LAO LETTER THO TAM
-	{0x0E98, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0E99, 0x0E9F, propertyPVALID},        // LAO LETTER NO..LAO LETTER FO SUNG
-	{0x0EA0, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0EA1, 0x0EA3, propertyPVALID},        // LAO LETTER MO..LAO LETTER LO LING
-	{0x0EA4, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0EA5, 0x0, propertyPVALID},           // LAO LETTER LO LOOT
-	{0x0EA6, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0EA7, 0x0, propertyPVALID},           // LAO LETTER WO
-	{0x0EA8, 0x0EA9, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0EAA, 0x0EAB, propertyPVALID},        // LAO LETTER SO SUNG..LAO LETTER HO SUNG
-	{0x0EAC, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0EAD, 0x0EB2, propertyPVALID},        // LAO LETTER O..LAO VOWEL SIGN AA
-	{0x0EB3, 0x0, propertyDISALLOWED},       // LAO VOWEL SIGN AM
-	{0x0EB4, 0x0EB9, propertyPVALID},        // LAO VOWEL SIGN I..LAO VOWEL SIGN UU
-	{0x0EBA, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0EBB, 0x0EBD, propertyPVALID},        // LAO VOWEL SIGN MAI KON..LAO SEMIVOWEL SIGN N
-	{0x0EBE, 0x0EBF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0EC0, 0x0EC4, propertyPVALID},        // LAO VOWEL SIGN E..LAO VOWEL SIGN AI
-	{0x0EC5, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0EC6, 0x0, propertyPVALID},           // LAO KO LA
-	{0x0EC7, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0EC8, 0x0ECD, propertyPVALID},        // LAO TONE MAI EK..LAO NIGGAHITA
-	{0x0ECE, 0x0ECF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0ED0, 0x0ED9, propertyPVALID},        // LAO DIGIT ZERO..LAO DIGIT NINE
-	{0x0EDA, 0x0EDB, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0EDC, 0x0EDD, propertyDISALLOWED},    // LAO HO NO..LAO HO MO
-	{0x0EDE, 0x0EFF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0F00, 0x0, propertyPVALID},           // TIBETAN SYLLABLE OM
-	{0x0F01, 0x0F0A, propertyDISALLOWED},    // TIBETAN MARK GTER YIG MGO TRUNCATED A..TIBET
-	{0x0F0B, 0x0, propertyPVALID},           // TIBETAN MARK INTERSYLLABIC TSHEG
-	{0x0F0C, 0x0F17, propertyDISALLOWED},    // TIBETAN MARK DELIMITER TSHEG BSTAR..TIBETAN
-	{0x0F18, 0x0F19, propertyPVALID},        // TIBETAN ASTROLOGICAL SIGN -KHYUD PA..TIBETAN
-	{0x0F1A, 0x0F1F, propertyDISALLOWED},    // TIBETAN SIGN RDEL DKAR GCIG..TIBETAN SIGN RD
-	{0x0F20, 0x0F29, propertyPVALID},        // TIBETAN DIGIT ZERO..TIBETAN DIGIT NINE
-	{0x0F2A, 0x0F34, propertyDISALLOWED},    // TIBETAN DIGIT HALF ONE..TIBETAN MARK BSDUS R
-	{0x0F35, 0x0, propertyPVALID},           // TIBETAN MARK NGAS BZUNG NYI ZLA
-	{0x0F36, 0x0, propertyDISALLOWED},       // TIBETAN MARK CARET -DZUD RTAGS BZHI MIG CAN
-	{0x0F37, 0x0, propertyPVALID},           // TIBETAN MARK NGAS BZUNG SGOR RTAGS
-	{0x0F38, 0x0, propertyDISALLOWED},       // TIBETAN MARK CHE MGO
-	{0x0F39, 0x0, propertyPVALID},           // TIBETAN MARK TSA -PHRU
-	{0x0F3A, 0x0F3D, propertyDISALLOWED},    // TIBETAN MARK GUG RTAGS GYON..TIBETAN MARK AN
-	{0x0F3E, 0x0F42, propertyPVALID},        // TIBETAN SIGN YAR TSHES..TIBETAN LETTER GA
-	{0x0F43, 0x0, propertyDISALLOWED},       // TIBETAN LETTER GHA
-	{0x0F44, 0x0F47, propertyPVALID},        // TIBETAN LETTER NGA..TIBETAN LETTER JA
-	{0x0F48, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0F49, 0x0F4C, propertyPVALID},        // TIBETAN LETTER NYA..TIBETAN LETTER DDA
-	{0x0F4D, 0x0, propertyDISALLOWED},       // TIBETAN LETTER DDHA
-	{0x0F4E, 0x0F51, propertyPVALID},        // TIBETAN LETTER NNA..TIBETAN LETTER DA
-	{0x0F52, 0x0, propertyDISALLOWED},       // TIBETAN LETTER DHA
-	{0x0F53, 0x0F56, propertyPVALID},        // TIBETAN LETTER NA..TIBETAN LETTER BA
-	{0x0F57, 0x0, propertyDISALLOWED},       // TIBETAN LETTER BHA
-	{0x0F58, 0x0F5B, propertyPVALID},        // TIBETAN LETTER MA..TIBETAN LETTER DZA
-	{0x0F5C, 0x0, propertyDISALLOWED},       // TIBETAN LETTER DZHA
-	{0x0F5D, 0x0F68, propertyPVALID},        // TIBETAN LETTER WA..TIBETAN LETTER A
-	{0x0F69, 0x0, propertyDISALLOWED},       // TIBETAN LETTER KSSA
-	{0x0F6A, 0x0F6C, propertyPVALID},        // TIBETAN LETTER FIXED-FORM RA..TIBETAN LETTER
-	{0x0F6D, 0x0F70, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0F71, 0x0F72, propertyPVALID},        // TIBETAN VOWEL SIGN AA..TIBETAN VOWEL SIGN I
-	{0x0F73, 0x0, propertyDISALLOWED},       // TIBETAN VOWEL SIGN II
-	{0x0F74, 0x0, propertyPVALID},           // TIBETAN VOWEL SIGN U
-	{0x0F75, 0x0F79, propertyDISALLOWED},    // TIBETAN VOWEL SIGN UU..TIBETAN VOWEL SIGN VO
-	{0x0F7A, 0x0F80, propertyPVALID},        // TIBETAN VOWEL SIGN E..TIBETAN VOWEL SIGN REV
-	{0x0F81, 0x0, propertyDISALLOWED},       // TIBETAN VOWEL SIGN REVERSED II
-	{0x0F82, 0x0F84, propertyPVALID},        // TIBETAN SIGN NYI ZLA NAA DA..TIBETAN MARK HA
-	{0x0F85, 0x0, propertyDISALLOWED},       // TIBETAN MARK PALUTA
-	{0x0F86, 0x0F8B, propertyPVALID},        // TIBETAN SIGN LCI RTAGS..TIBETAN SIGN GRU MED
-	{0x0F8C, 0x0F8F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x0F90, 0x0F92, propertyPVALID},        // TIBETAN SUBJOINED LETTER KA..TIBETAN SUBJOIN
-	{0x0F93, 0x0, propertyDISALLOWED},       // TIBETAN SUBJOINED LETTER GHA
-	{0x0F94, 0x0F97, propertyPVALID},        // TIBETAN SUBJOINED LETTER NGA..TIBETAN SUBJOI
-	{0x0F98, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0F99, 0x0F9C, propertyPVALID},        // TIBETAN SUBJOINED LETTER NYA..TIBETAN SUBJOI
-	{0x0F9D, 0x0, propertyDISALLOWED},       // TIBETAN SUBJOINED LETTER DDHA
-	{0x0F9E, 0x0FA1, propertyPVALID},        // TIBETAN SUBJOINED LETTER NNA..TIBETAN SUBJOI
-	{0x0FA2, 0x0, propertyDISALLOWED},       // TIBETAN SUBJOINED LETTER DHA
-	{0x0FA3, 0x0FA6, propertyPVALID},        // TIBETAN SUBJOINED LETTER NA..TIBETAN SUBJOIN
-	{0x0FA7, 0x0, propertyDISALLOWED},       // TIBETAN SUBJOINED LETTER BHA
-	{0x0FA8, 0x0FAB, propertyPVALID},        // TIBETAN SUBJOINED LETTER MA..TIBETAN SUBJOIN
-	{0x0FAC, 0x0, propertyDISALLOWED},       // TIBETAN SUBJOINED LETTER DZHA
-	{0x0FAD, 0x0FB8, propertyPVALID},        // TIBETAN SUBJOINED LETTER WA..TIBETAN SUBJOIN
-	{0x0FB9, 0x0, propertyDISALLOWED},       // TIBETAN SUBJOINED LETTER KSSA
-	{0x0FBA, 0x0FBC, propertyPVALID},        // TIBETAN SUBJOINED LETTER FIXED-FORM WA..TIBE
-	{0x0FBD, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0FBE, 0x0FC5, propertyDISALLOWED},    // TIBETAN KU RU KHA..TIBETAN SYMBOL RDO RJE
-	{0x0FC6, 0x0, propertyPVALID},           // TIBETAN SYMBOL PADMA GDAN
-	{0x0FC7, 0x0FCC, propertyDISALLOWED},    // TIBETAN SYMBOL RDO RJE RGYA GRAM..TIBETAN SY
-	{0x0FCD, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x0FCE, 0x0FD8, propertyDISALLOWED},    // TIBETAN SIGN RDEL NAG RDEL DKAR..LEFT-FACING
-	{0x0FD9, 0x0FFF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1000, 0x1049, propertyPVALID},        // MYANMAR LETTER KA..MYANMAR DIGIT NINE
-	{0x104A, 0x104F, propertyDISALLOWED},    // MYANMAR SIGN LITTLE SECTION..MYANMAR SYMBOL
-	{0x1050, 0x109D, propertyPVALID},        // MYANMAR LETTER SHA..MYANMAR VOWEL SIGN AITON
-	{0x109E, 0x10C5, propertyDISALLOWED},    // MYANMAR SYMBOL SHAN ONE..GEORGIAN CAPITAL LE
-	{0x10C6, 0x10CF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x10D0, 0x10FA, propertyPVALID},        // GEORGIAN LETTER AN..GEORGIAN LETTER AIN
-	{0x10FB, 0x10FC, propertyDISALLOWED},    // GEORGIAN PARAGRAPH SEPARATOR..MODIFIER LETTE
-	{0x10FD, 0x10FF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1100, 0x11FF, propertyDISALLOWED},    // HANGUL CHOSEONG KIYEOK..HANGUL JONGSEONG SSA
-	{0x1200, 0x1248, propertyPVALID},        // ETHIOPIC SYLLABLE HA..ETHIOPIC SYLLABLE QWA
-	{0x1249, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x124A, 0x124D, propertyPVALID},        // ETHIOPIC SYLLABLE QWI..ETHIOPIC SYLLABLE QWE
-	{0x124E, 0x124F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1250, 0x1256, propertyPVALID},        // ETHIOPIC SYLLABLE QHA..ETHIOPIC SYLLABLE QHO
-	{0x1257, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x1258, 0x0, propertyPVALID},           // ETHIOPIC SYLLABLE QHWA
-	{0x1259, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x125A, 0x125D, propertyPVALID},        // ETHIOPIC SYLLABLE QHWI..ETHIOPIC SYLLABLE QH
-	{0x125E, 0x125F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1260, 0x1288, propertyPVALID},        // ETHIOPIC SYLLABLE BA..ETHIOPIC SYLLABLE XWA
-	{0x1289, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x128A, 0x128D, propertyPVALID},        // ETHIOPIC SYLLABLE XWI..ETHIOPIC SYLLABLE XWE
-	{0x128E, 0x128F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1290, 0x12B0, propertyPVALID},        // ETHIOPIC SYLLABLE NA..ETHIOPIC SYLLABLE KWA
-	{0x12B1, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x12B2, 0x12B5, propertyPVALID},        // ETHIOPIC SYLLABLE KWI..ETHIOPIC SYLLABLE KWE
-	{0x12B6, 0x12B7, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x12B8, 0x12BE, propertyPVALID},        // ETHIOPIC SYLLABLE KXA..ETHIOPIC SYLLABLE KXO
-	{0x12BF, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x12C0, 0x0, propertyPVALID},           // ETHIOPIC SYLLABLE KXWA
-	{0x12C1, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x12C2, 0x12C5, propertyPVALID},        // ETHIOPIC SYLLABLE KXWI..ETHIOPIC SYLLABLE KX
-	{0x12C6, 0x12C7, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x12C8, 0x12D6, propertyPVALID},        // ETHIOPIC SYLLABLE WA..ETHIOPIC SYLLABLE PHAR
-	{0x12D7, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x12D8, 0x1310, propertyPVALID},        // ETHIOPIC SYLLABLE ZA..ETHIOPIC SYLLABLE GWA
-	{0x1311, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x1312, 0x1315, propertyPVALID},        // ETHIOPIC SYLLABLE GWI..ETHIOPIC SYLLABLE GWE
-	{0x1316, 0x1317, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1318, 0x135A, propertyPVALID},        // ETHIOPIC SYLLABLE GGA..ETHIOPIC SYLLABLE FYA
-	{0x135B, 0x135E, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x135F, 0x0, propertyPVALID},           // ETHIOPIC COMBINING GEMINATION MARK
-	{0x1360, 0x137C, propertyDISALLOWED},    // ETHIOPIC SECTION MARK..ETHIOPIC NUMBER TEN T
-	{0x137D, 0x137F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1380, 0x138F, propertyPVALID},        // ETHIOPIC SYLLABLE SEBATBEIT MWA..ETHIOPIC SY
-	{0x1390, 0x1399, propertyDISALLOWED},    // ETHIOPIC TONAL MARK YIZET..ETHIOPIC TONAL MA
-	{0x139A, 0x139F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x13A0, 0x13F4, propertyPVALID},        // CHEROKEE LETTER A..CHEROKEE LETTER YV
-	{0x13F5, 0x13FF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1400, 0x0, propertyDISALLOWED},       // CANADIAN SYLLABICS HYPHEN
-	{0x1401, 0x166C, propertyPVALID},        // CANADIAN SYLLABICS E..CANADIAN SYLLABICS CAR
-	{0x166D, 0x166E, propertyDISALLOWED},    // CANADIAN SYLLABICS CHI SIGN..CANADIAN SYLLAB
-	{0x166F, 0x167F, propertyPVALID},        // CANADIAN SYLLABICS QAI..CANADIAN SYLLABICS B
-	{0x1680, 0x0, propertyDISALLOWED},       // OGHAM SPACE MARK
-	{0x1681, 0x169A, propertyPVALID},        // OGHAM LETTER BEITH..OGHAM LETTER PEITH
-	{0x169B, 0x169C, propertyDISALLOWED},    // OGHAM FEATHER MARK..OGHAM REVERSED FEATHER M
-	{0x169D, 0x169F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x16A0, 0x16EA, propertyPVALID},        // RUNIC LETTER FEHU FEOH FE F..RUNIC LETTER X
-	{0x16EB, 0x16F0, propertyDISALLOWED},    // RUNIC SINGLE PUNCTUATION..RUNIC BELGTHOR SYM
-	{0x16F1, 0x16FF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1700, 0x170C, propertyPVALID},        // TAGALOG LETTER A..TAGALOG LETTER YA
-	{0x170D, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x170E, 0x1714, propertyPVALID},        // TAGALOG LETTER LA..TAGALOG SIGN VIRAMA
-	{0x1715, 0x171F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1720, 0x1734, propertyPVALID},        // HANUNOO LETTER A..HANUNOO SIGN PAMUDPOD
-	{0x1735, 0x1736, propertyDISALLOWED},    // PHILIPPINE SINGLE PUNCTUATION..PHILIPPINE DO
-	{0x1737, 0x173F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1740, 0x1753, propertyPVALID},        // BUHID LETTER A..BUHID VOWEL SIGN U
-	{0x1754, 0x175F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1760, 0x176C, propertyPVALID},        // TAGBANWA LETTER A..TAGBANWA LETTER YA
-	{0x176D, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x176E, 0x1770, propertyPVALID},        // TAGBANWA LETTER LA..TAGBANWA LETTER SA
-	{0x1771, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x1772, 0x1773, propertyPVALID},        // TAGBANWA VOWEL SIGN I..TAGBANWA VOWEL SIGN U
-	{0x1774, 0x177F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1780, 0x17B3, propertyPVALID},        // KHMER LETTER KA..KHMER INDEPENDENT VOWEL QAU
-	{0x17B4, 0x17B5, propertyDISALLOWED},    // KHMER VOWEL INHERENT AQ..KHMER VOWEL INHEREN
-	{0x17B6, 0x17D3, propertyPVALID},        // KHMER VOWEL SIGN AA..KHMER SIGN BATHAMASAT
-	{0x17D4, 0x17D6, propertyDISALLOWED},    // KHMER SIGN KHAN..KHMER SIGN CAMNUC PII KUUH
-	{0x17D7, 0x0, propertyPVALID},           // KHMER SIGN LEK TOO
-	{0x17D8, 0x17DB, propertyDISALLOWED},    // KHMER SIGN BEYYAL..KHMER CURRENCY SYMBOL RIE
-	{0x17DC, 0x17DD, propertyPVALID},        // KHMER SIGN AVAKRAHASANYA..KHMER SIGN ATTHACA
-	{0x17DE, 0x17DF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x17E0, 0x17E9, propertyPVALID},        // KHMER DIGIT ZERO..KHMER DIGIT NINE
-	{0x17EA, 0x17EF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x17F0, 0x17F9, propertyDISALLOWED},    // KHMER SYMBOL LEK ATTAK SON..KHMER SYMBOL LEK
-	{0x17FA, 0x17FF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1800, 0x180E, propertyDISALLOWED},    // MONGOLIAN BIRGA..MONGOLIAN VOWEL SEPARATOR
-	{0x180F, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x1810, 0x1819, propertyPVALID},        // MONGOLIAN DIGIT ZERO..MONGOLIAN DIGIT NINE
-	{0x181A, 0x181F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1820, 0x1877, propertyPVALID},        // MONGOLIAN LETTER A..MONGOLIAN LETTER MANCHU
-	{0x1878, 0x187F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1880, 0x18AA, propertyPVALID},        // MONGOLIAN LETTER ALI GALI ANUSVARA ONE..MONG
-	{0x18AB, 0x18AF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x18B0, 0x18F5, propertyPVALID},        // CANADIAN SYLLABICS OY..CANADIAN SYLLABICS CA
-	{0x18F6, 0x18FF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1900, 0x191C, propertyPVALID},        // LIMBU VOWEL-CARRIER LETTER..LIMBU LETTER HA
-	{0x191D, 0x191F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1920, 0x192B, propertyPVALID},        // LIMBU VOWEL SIGN A..LIMBU SUBJOINED LETTER W
-	{0x192C, 0x192F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1930, 0x193B, propertyPVALID},        // LIMBU SMALL LETTER KA..LIMBU SIGN SA-I
-	{0x193C, 0x193F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1940, 0x0, propertyDISALLOWED},       // LIMBU SIGN LOO
-	{0x1941, 0x1943, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1944, 0x1945, propertyDISALLOWED},    // LIMBU EXCLAMATION MARK..LIMBU QUESTION MARK
-	{0x1946, 0x196D, propertyPVALID},        // LIMBU DIGIT ZERO..TAI LE LETTER AI
-	{0x196E, 0x196F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1970, 0x1974, propertyPVALID},        // TAI LE LETTER TONE-2..TAI LE LETTER TONE-6
-	{0x1975, 0x197F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1980, 0x19AB, propertyPVALID},        // NEW TAI LUE LETTER HIGH QA..NEW TAI LUE LETT
-	{0x19AC, 0x19AF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x19B0, 0x19C9, propertyPVALID},        // NEW TAI LUE VOWEL SIGN VOWEL SHORTENER..NEW
-	{0x19CA, 0x19CF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x19D0, 0x19DA, propertyPVALID},        // NEW TAI LUE DIGIT ZERO..NEW TAI LUE THAM DIG
-	{0x19DB, 0x19DD, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x19DE, 0x19FF, propertyDISALLOWED},    // NEW TAI LUE SIGN LAE..KHMER SYMBOL DAP-PRAM
-	{0x1A00, 0x1A1B, propertyPVALID},        // BUGINESE LETTER KA..BUGINESE VOWEL SIGN AE
-	{0x1A1C, 0x1A1D, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1A1E, 0x1A1F, propertyDISALLOWED},    // BUGINESE PALLAWA..BUGINESE END OF SECTION
-	{0x1A20, 0x1A5E, propertyPVALID},        // TAI THAM LETTER HIGH KA..TAI THAM CONSONANT
-	{0x1A5F, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x1A60, 0x1A7C, propertyPVALID},        // TAI THAM SIGN SAKOT..TAI THAM SIGN KHUEN-LUE
-	{0x1A7D, 0x1A7E, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1A7F, 0x1A89, propertyPVALID},        // TAI THAM COMBINING CRYPTOGRAMMIC DOT..TAI TH
-	{0x1A8A, 0x1A8F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1A90, 0x1A99, propertyPVALID},        // TAI THAM THAM DIGIT ZERO..TAI THAM THAM DIGI
-	{0x1A9A, 0x1A9F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1AA0, 0x1AA6, propertyDISALLOWED},    // TAI THAM SIGN WIANG..TAI THAM SIGN REVERSED
-	{0x1AA7, 0x0, propertyPVALID},           // TAI THAM SIGN MAI YAMOK
-	{0x1AA8, 0x1AAD, propertyDISALLOWED},    // TAI THAM SIGN KAAN..TAI THAM SIGN CAANG
-	{0x1AAE, 0x1AFF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1B00, 0x1B4B, propertyPVALID},        // BALINESE SIGN ULU RICEM..BALINESE LETTER ASY
-	{0x1B4C, 0x1B4F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1B50, 0x1B59, propertyPVALID},        // BALINESE DIGIT ZERO..BALINESE DIGIT NINE
-	{0x1B5A, 0x1B6A, propertyDISALLOWED},    // BALINESE PANTI..BALINESE MUSICAL SYMBOL DANG
-	{0x1B6B, 0x1B73, propertyPVALID},        // BALINESE MUSICAL SYMBOL COMBINING TEGEH..BAL
-	{0x1B74, 0x1B7C, propertyDISALLOWED},    // BALINESE MUSICAL SYMBOL RIGHT-HAND OPEN DUG.
-	{0x1B7D, 0x1B7F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1B80, 0x1BAA, propertyPVALID},        // SUNDANESE SIGN PANYECEK..SUNDANESE SIGN PAMA
-	{0x1BAB, 0x1BAD, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1BAE, 0x1BB9, propertyPVALID},        // SUNDANESE LETTER KHA..SUNDANESE DIGIT NINE
-	{0x1BBA, 0x1BFF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1C00, 0x1C37, propertyPVALID},        // LEPCHA LETTER KA..LEPCHA SIGN NUKTA
-	{0x1C38, 0x1C3A, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1C3B, 0x1C3F, propertyDISALLOWED},    // LEPCHA PUNCTUATION TA-ROL..LEPCHA PUNCTUATIO
-	{0x1C40, 0x1C49, propertyPVALID},        // LEPCHA DIGIT ZERO..LEPCHA DIGIT NINE
-	{0x1C4A, 0x1C4C, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1C4D, 0x1C7D, propertyPVALID},        // LEPCHA LETTER TTA..OL CHIKI AHAD
-	{0x1C7E, 0x1C7F, propertyDISALLOWED},    // OL CHIKI PUNCTUATION MUCAAD..OL CHIKI PUNCTU
-	{0x1C80, 0x1CCF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1CD0, 0x1CD2, propertyPVALID},        // VEDIC TONE KARSHANA..VEDIC TONE PRENKHA
-	{0x1CD3, 0x0, propertyDISALLOWED},       // VEDIC SIGN NIHSHVASA
-	{0x1CD4, 0x1CF2, propertyPVALID},        // VEDIC SIGN YAJURVEDIC MIDLINE SVARITA..VEDIC
-	{0x1CF3, 0x1CFF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1D00, 0x1D2B, propertyPVALID},        // LATIN LETTER SMALL CAPITAL A..CYRILLIC LETTE
-	{0x1D2C, 0x1D2E, propertyDISALLOWED},    // MODIFIER LETTER CAPITAL A..MODIFIER LETTER C
-	{0x1D2F, 0x0, propertyPVALID},           // MODIFIER LETTER CAPITAL BARRED B
-	{0x1D30, 0x1D3A, propertyDISALLOWED},    // MODIFIER LETTER CAPITAL D..MODIFIER LETTER C
-	{0x1D3B, 0x0, propertyPVALID},           // MODIFIER LETTER CAPITAL REVERSED N
-	{0x1D3C, 0x1D4D, propertyDISALLOWED},    // MODIFIER LETTER CAPITAL O..MODIFIER LETTER S
-	{0x1D4E, 0x0, propertyPVALID},           // MODIFIER LETTER SMALL TURNED I
-	{0x1D4F, 0x1D6A, propertyDISALLOWED},    // MODIFIER LETTER SMALL K..GREEK SUBSCRIPT SMA
-	{0x1D6B, 0x1D77, propertyPVALID},        // LATIN SMALL LETTER UE..LATIN SMALL LETTER TU
-	{0x1D78, 0x0, propertyDISALLOWED},       // MODIFIER LETTER CYRILLIC EN
-	{0x1D79, 0x1D9A, propertyPVALID},        // LATIN SMALL LETTER INSULAR G..LATIN SMALL LE
-	{0x1D9B, 0x1DBF, propertyDISALLOWED},    // MODIFIER LETTER SMALL TURNED ALPHA..MODIFIER
-	{0x1DC0, 0x1DE6, propertyPVALID},        // COMBINING DOTTED GRAVE ACCENT..COMBINING LAT
-	{0x1DE7, 0x1DFC, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1DFD, 0x1DFF, propertyPVALID},        // COMBINING ALMOST EQUAL TO BELOW..COMBINING R
-	{0x1E00, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER A WITH RING BELOW
-	{0x1E01, 0x0, propertyPVALID},           // LATIN SMALL LETTER A WITH RING BELOW
-	{0x1E02, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER B WITH DOT ABOVE
-	{0x1E03, 0x0, propertyPVALID},           // LATIN SMALL LETTER B WITH DOT ABOVE
-	{0x1E04, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER B WITH DOT BELOW
-	{0x1E05, 0x0, propertyPVALID},           // LATIN SMALL LETTER B WITH DOT BELOW
-	{0x1E06, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER B WITH LINE BELOW
-	{0x1E07, 0x0, propertyPVALID},           // LATIN SMALL LETTER B WITH LINE BELOW
-	{0x1E08, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER C WITH CEDILLA AND ACUT
-	{0x1E09, 0x0, propertyPVALID},           // LATIN SMALL LETTER C WITH CEDILLA AND ACUTE
-	{0x1E0A, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER D WITH DOT ABOVE
-	{0x1E0B, 0x0, propertyPVALID},           // LATIN SMALL LETTER D WITH DOT ABOVE
-	{0x1E0C, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER D WITH DOT BELOW
-	{0x1E0D, 0x0, propertyPVALID},           // LATIN SMALL LETTER D WITH DOT BELOW
-	{0x1E0E, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER D WITH LINE BELOW
-	{0x1E0F, 0x0, propertyPVALID},           // LATIN SMALL LETTER D WITH LINE BELOW
-	{0x1E10, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER D WITH CEDILLA
-	{0x1E11, 0x0, propertyPVALID},           // LATIN SMALL LETTER D WITH CEDILLA
-	{0x1E12, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER D WITH CIRCUMFLEX BELOW
-	{0x1E13, 0x0, propertyPVALID},           // LATIN SMALL LETTER D WITH CIRCUMFLEX BELOW
-	{0x1E14, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER E WITH MACRON AND GRAVE
-	{0x1E15, 0x0, propertyPVALID},           // LATIN SMALL LETTER E WITH MACRON AND GRAVE
-	{0x1E16, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER E WITH MACRON AND ACUTE
-	{0x1E17, 0x0, propertyPVALID},           // LATIN SMALL LETTER E WITH MACRON AND ACUTE
-	{0x1E18, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER E WITH CIRCUMFLEX BELOW
-	{0x1E19, 0x0, propertyPVALID},           // LATIN SMALL LETTER E WITH CIRCUMFLEX BELOW
-	{0x1E1A, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER E WITH TILDE BELOW
-	{0x1E1B, 0x0, propertyPVALID},           // LATIN SMALL LETTER E WITH TILDE BELOW
-	{0x1E1C, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER E WITH CEDILLA AND BREV
-	{0x1E1D, 0x0, propertyPVALID},           // LATIN SMALL LETTER E WITH CEDILLA AND BREVE
-	{0x1E1E, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER F WITH DOT ABOVE
-	{0x1E1F, 0x0, propertyPVALID},           // LATIN SMALL LETTER F WITH DOT ABOVE
-	{0x1E20, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER G WITH MACRON
-	{0x1E21, 0x0, propertyPVALID},           // LATIN SMALL LETTER G WITH MACRON
-	{0x1E22, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER H WITH DOT ABOVE
-	{0x1E23, 0x0, propertyPVALID},           // LATIN SMALL LETTER H WITH DOT ABOVE
-	{0x1E24, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER H WITH DOT BELOW
-	{0x1E25, 0x0, propertyPVALID},           // LATIN SMALL LETTER H WITH DOT BELOW
-	{0x1E26, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER H WITH DIAERESIS
-	{0x1E27, 0x0, propertyPVALID},           // LATIN SMALL LETTER H WITH DIAERESIS
-	{0x1E28, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER H WITH CEDILLA
-	{0x1E29, 0x0, propertyPVALID},           // LATIN SMALL LETTER H WITH CEDILLA
-	{0x1E2A, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER H WITH BREVE BELOW
-	{0x1E2B, 0x0, propertyPVALID},           // LATIN SMALL LETTER H WITH BREVE BELOW
-	{0x1E2C, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER I WITH TILDE BELOW
-	{0x1E2D, 0x0, propertyPVALID},           // LATIN SMALL LETTER I WITH TILDE BELOW
-	{0x1E2E, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER I WITH DIAERESIS AND AC
-	{0x1E2F, 0x0, propertyPVALID},           // LATIN SMALL LETTER I WITH DIAERESIS AND ACUT
-	{0x1E30, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER K WITH ACUTE
-	{0x1E31, 0x0, propertyPVALID},           // LATIN SMALL LETTER K WITH ACUTE
-	{0x1E32, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER K WITH DOT BELOW
-	{0x1E33, 0x0, propertyPVALID},           // LATIN SMALL LETTER K WITH DOT BELOW
-	{0x1E34, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER K WITH LINE BELOW
-	{0x1E35, 0x0, propertyPVALID},           // LATIN SMALL LETTER K WITH LINE BELOW
-	{0x1E36, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER L WITH DOT BELOW
-	{0x1E37, 0x0, propertyPVALID},           // LATIN SMALL LETTER L WITH DOT BELOW
-	{0x1E38, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER L WITH DOT BELOW AND MA
-	{0x1E39, 0x0, propertyPVALID},           // LATIN SMALL LETTER L WITH DOT BELOW AND MACR
-	{0x1E3A, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER L WITH LINE BELOW
-	{0x1E3B, 0x0, propertyPVALID},           // LATIN SMALL LETTER L WITH LINE BELOW
-	{0x1E3C, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER L WITH CIRCUMFLEX BELOW
-	{0x1E3D, 0x0, propertyPVALID},           // LATIN SMALL LETTER L WITH CIRCUMFLEX BELOW
-	{0x1E3E, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER M WITH ACUTE
-	{0x1E3F, 0x0, propertyPVALID},           // LATIN SMALL LETTER M WITH ACUTE
-	{0x1E40, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER M WITH DOT ABOVE
-	{0x1E41, 0x0, propertyPVALID},           // LATIN SMALL LETTER M WITH DOT ABOVE
-	{0x1E42, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER M WITH DOT BELOW
-	{0x1E43, 0x0, propertyPVALID},           // LATIN SMALL LETTER M WITH DOT BELOW
-	{0x1E44, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER N WITH DOT ABOVE
-	{0x1E45, 0x0, propertyPVALID},           // LATIN SMALL LETTER N WITH DOT ABOVE
-	{0x1E46, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER N WITH DOT BELOW
-	{0x1E47, 0x0, propertyPVALID},           // LATIN SMALL LETTER N WITH DOT BELOW
-	{0x1E48, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER N WITH LINE BELOW
-	{0x1E49, 0x0, propertyPVALID},           // LATIN SMALL LETTER N WITH LINE BELOW
-	{0x1E4A, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER N WITH CIRCUMFLEX BELOW
-	{0x1E4B, 0x0, propertyPVALID},           // LATIN SMALL LETTER N WITH CIRCUMFLEX BELOW
-	{0x1E4C, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH TILDE AND ACUTE
-	{0x1E4D, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH TILDE AND ACUTE
-	{0x1E4E, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH TILDE AND DIAERE
-	{0x1E4F, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH TILDE AND DIAERESI
-	{0x1E50, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH MACRON AND GRAVE
-	{0x1E51, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH MACRON AND GRAVE
-	{0x1E52, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH MACRON AND ACUTE
-	{0x1E53, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH MACRON AND ACUTE
-	{0x1E54, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER P WITH ACUTE
-	{0x1E55, 0x0, propertyPVALID},           // LATIN SMALL LETTER P WITH ACUTE
-	{0x1E56, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER P WITH DOT ABOVE
-	{0x1E57, 0x0, propertyPVALID},           // LATIN SMALL LETTER P WITH DOT ABOVE
-	{0x1E58, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER R WITH DOT ABOVE
-	{0x1E59, 0x0, propertyPVALID},           // LATIN SMALL LETTER R WITH DOT ABOVE
-	{0x1E5A, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER R WITH DOT BELOW
-	{0x1E5B, 0x0, propertyPVALID},           // LATIN SMALL LETTER R WITH DOT BELOW
-	{0x1E5C, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER R WITH DOT BELOW AND MA
-	{0x1E5D, 0x0, propertyPVALID},           // LATIN SMALL LETTER R WITH DOT BELOW AND MACR
-	{0x1E5E, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER R WITH LINE BELOW
-	{0x1E5F, 0x0, propertyPVALID},           // LATIN SMALL LETTER R WITH LINE BELOW
-	{0x1E60, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER S WITH DOT ABOVE
-	{0x1E61, 0x0, propertyPVALID},           // LATIN SMALL LETTER S WITH DOT ABOVE
-	{0x1E62, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER S WITH DOT BELOW
-	{0x1E63, 0x0, propertyPVALID},           // LATIN SMALL LETTER S WITH DOT BELOW
-	{0x1E64, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER S WITH ACUTE AND DOT AB
-	{0x1E65, 0x0, propertyPVALID},           // LATIN SMALL LETTER S WITH ACUTE AND DOT ABOV
-	{0x1E66, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER S WITH CARON AND DOT AB
-	{0x1E67, 0x0, propertyPVALID},           // LATIN SMALL LETTER S WITH CARON AND DOT ABOV
-	{0x1E68, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER S WITH DOT BELOW AND DO
-	{0x1E69, 0x0, propertyPVALID},           // LATIN SMALL LETTER S WITH DOT BELOW AND DOT
-	{0x1E6A, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER T WITH DOT ABOVE
-	{0x1E6B, 0x0, propertyPVALID},           // LATIN SMALL LETTER T WITH DOT ABOVE
-	{0x1E6C, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER T WITH DOT BELOW
-	{0x1E6D, 0x0, propertyPVALID},           // LATIN SMALL LETTER T WITH DOT BELOW
-	{0x1E6E, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER T WITH LINE BELOW
-	{0x1E6F, 0x0, propertyPVALID},           // LATIN SMALL LETTER T WITH LINE BELOW
-	{0x1E70, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER T WITH CIRCUMFLEX BELOW
-	{0x1E71, 0x0, propertyPVALID},           // LATIN SMALL LETTER T WITH CIRCUMFLEX BELOW
-	{0x1E72, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER U WITH DIAERESIS BELOW
-	{0x1E73, 0x0, propertyPVALID},           // LATIN SMALL LETTER U WITH DIAERESIS BELOW
-	{0x1E74, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER U WITH TILDE BELOW
-	{0x1E75, 0x0, propertyPVALID},           // LATIN SMALL LETTER U WITH TILDE BELOW
-	{0x1E76, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER U WITH CIRCUMFLEX BELOW
-	{0x1E77, 0x0, propertyPVALID},           // LATIN SMALL LETTER U WITH CIRCUMFLEX BELOW
-	{0x1E78, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER U WITH TILDE AND ACUTE
-	{0x1E79, 0x0, propertyPVALID},           // LATIN SMALL LETTER U WITH TILDE AND ACUTE
-	{0x1E7A, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER U WITH MACRON AND DIAER
-	{0x1E7B, 0x0, propertyPVALID},           // LATIN SMALL LETTER U WITH MACRON AND DIAERES
-	{0x1E7C, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER V WITH TILDE
-	{0x1E7D, 0x0, propertyPVALID},           // LATIN SMALL LETTER V WITH TILDE
-	{0x1E7E, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER V WITH DOT BELOW
-	{0x1E7F, 0x0, propertyPVALID},           // LATIN SMALL LETTER V WITH DOT BELOW
-	{0x1E80, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER W WITH GRAVE
-	{0x1E81, 0x0, propertyPVALID},           // LATIN SMALL LETTER W WITH GRAVE
-	{0x1E82, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER W WITH ACUTE
-	{0x1E83, 0x0, propertyPVALID},           // LATIN SMALL LETTER W WITH ACUTE
-	{0x1E84, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER W WITH DIAERESIS
-	{0x1E85, 0x0, propertyPVALID},           // LATIN SMALL LETTER W WITH DIAERESIS
-	{0x1E86, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER W WITH DOT ABOVE
-	{0x1E87, 0x0, propertyPVALID},           // LATIN SMALL LETTER W WITH DOT ABOVE
-	{0x1E88, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER W WITH DOT BELOW
-	{0x1E89, 0x0, propertyPVALID},           // LATIN SMALL LETTER W WITH DOT BELOW
-	{0x1E8A, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER X WITH DOT ABOVE
-	{0x1E8B, 0x0, propertyPVALID},           // LATIN SMALL LETTER X WITH DOT ABOVE
-	{0x1E8C, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER X WITH DIAERESIS
-	{0x1E8D, 0x0, propertyPVALID},           // LATIN SMALL LETTER X WITH DIAERESIS
-	{0x1E8E, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER Y WITH DOT ABOVE
-	{0x1E8F, 0x0, propertyPVALID},           // LATIN SMALL LETTER Y WITH DOT ABOVE
-	{0x1E90, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER Z WITH CIRCUMFLEX
-	{0x1E91, 0x0, propertyPVALID},           // LATIN SMALL LETTER Z WITH CIRCUMFLEX
-	{0x1E92, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER Z WITH DOT BELOW
-	{0x1E93, 0x0, propertyPVALID},           // LATIN SMALL LETTER Z WITH DOT BELOW
-	{0x1E94, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER Z WITH LINE BELOW
-	{0x1E95, 0x1E99, propertyPVALID},        // LATIN SMALL LETTER Z WITH LINE BELOW..LATIN
-	{0x1E9A, 0x1E9B, propertyDISALLOWED},    // LATIN SMALL LETTER A WITH RIGHT HALF RING..L
-	{0x1E9C, 0x1E9D, propertyPVALID},        // LATIN SMALL LETTER LONG S WITH DIAGONAL STRO
-	{0x1E9E, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER SHARP S
-	{0x1E9F, 0x0, propertyPVALID},           // LATIN SMALL LETTER DELTA
-	{0x1EA0, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER A WITH DOT BELOW
-	{0x1EA1, 0x0, propertyPVALID},           // LATIN SMALL LETTER A WITH DOT BELOW
-	{0x1EA2, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER A WITH HOOK ABOVE
-	{0x1EA3, 0x0, propertyPVALID},           // LATIN SMALL LETTER A WITH HOOK ABOVE
-	{0x1EA4, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND A
-	{0x1EA5, 0x0, propertyPVALID},           // LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACU
-	{0x1EA6, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND G
-	{0x1EA7, 0x0, propertyPVALID},           // LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRA
-	{0x1EA8, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND H
-	{0x1EA9, 0x0, propertyPVALID},           // LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOO
-	{0x1EAA, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND T
-	{0x1EAB, 0x0, propertyPVALID},           // LATIN SMALL LETTER A WITH CIRCUMFLEX AND TIL
-	{0x1EAC, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND D
-	{0x1EAD, 0x0, propertyPVALID},           // LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT
-	{0x1EAE, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER A WITH BREVE AND ACUTE
-	{0x1EAF, 0x0, propertyPVALID},           // LATIN SMALL LETTER A WITH BREVE AND ACUTE
-	{0x1EB0, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER A WITH BREVE AND GRAVE
-	{0x1EB1, 0x0, propertyPVALID},           // LATIN SMALL LETTER A WITH BREVE AND GRAVE
-	{0x1EB2, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER A WITH BREVE AND HOOK A
-	{0x1EB3, 0x0, propertyPVALID},           // LATIN SMALL LETTER A WITH BREVE AND HOOK ABO
-	{0x1EB4, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER A WITH BREVE AND TILDE
-	{0x1EB5, 0x0, propertyPVALID},           // LATIN SMALL LETTER A WITH BREVE AND TILDE
-	{0x1EB6, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER A WITH BREVE AND DOT BE
-	{0x1EB7, 0x0, propertyPVALID},           // LATIN SMALL LETTER A WITH BREVE AND DOT BELO
-	{0x1EB8, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER E WITH DOT BELOW
-	{0x1EB9, 0x0, propertyPVALID},           // LATIN SMALL LETTER E WITH DOT BELOW
-	{0x1EBA, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER E WITH HOOK ABOVE
-	{0x1EBB, 0x0, propertyPVALID},           // LATIN SMALL LETTER E WITH HOOK ABOVE
-	{0x1EBC, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER E WITH TILDE
-	{0x1EBD, 0x0, propertyPVALID},           // LATIN SMALL LETTER E WITH TILDE
-	{0x1EBE, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND A
-	{0x1EBF, 0x0, propertyPVALID},           // LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACU
-	{0x1EC0, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND G
-	{0x1EC1, 0x0, propertyPVALID},           // LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRA
-	{0x1EC2, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND H
-	{0x1EC3, 0x0, propertyPVALID},           // LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOO
-	{0x1EC4, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND T
-	{0x1EC5, 0x0, propertyPVALID},           // LATIN SMALL LETTER E WITH CIRCUMFLEX AND TIL
-	{0x1EC6, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND D
-	{0x1EC7, 0x0, propertyPVALID},           // LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT
-	{0x1EC8, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER I WITH HOOK ABOVE
-	{0x1EC9, 0x0, propertyPVALID},           // LATIN SMALL LETTER I WITH HOOK ABOVE
-	{0x1ECA, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER I WITH DOT BELOW
-	{0x1ECB, 0x0, propertyPVALID},           // LATIN SMALL LETTER I WITH DOT BELOW
-	{0x1ECC, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH DOT BELOW
-	{0x1ECD, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH DOT BELOW
-	{0x1ECE, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH HOOK ABOVE
-	{0x1ECF, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH HOOK ABOVE
-	{0x1ED0, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND A
-	{0x1ED1, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACU
-	{0x1ED2, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND G
-	{0x1ED3, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRA
-	{0x1ED4, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND H
-	{0x1ED5, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOO
-	{0x1ED6, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND T
-	{0x1ED7, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH CIRCUMFLEX AND TIL
-	{0x1ED8, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND D
-	{0x1ED9, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT
-	{0x1EDA, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH HORN AND ACUTE
-	{0x1EDB, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH HORN AND ACUTE
-	{0x1EDC, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH HORN AND GRAVE
-	{0x1EDD, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH HORN AND GRAVE
-	{0x1EDE, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH HORN AND HOOK AB
-	{0x1EDF, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH HORN AND HOOK ABOV
-	{0x1EE0, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH HORN AND TILDE
-	{0x1EE1, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH HORN AND TILDE
-	{0x1EE2, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH HORN AND DOT BEL
-	{0x1EE3, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH HORN AND DOT BELOW
-	{0x1EE4, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER U WITH DOT BELOW
-	{0x1EE5, 0x0, propertyPVALID},           // LATIN SMALL LETTER U WITH DOT BELOW
-	{0x1EE6, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER U WITH HOOK ABOVE
-	{0x1EE7, 0x0, propertyPVALID},           // LATIN SMALL LETTER U WITH HOOK ABOVE
-	{0x1EE8, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER U WITH HORN AND ACUTE
-	{0x1EE9, 0x0, propertyPVALID},           // LATIN SMALL LETTER U WITH HORN AND ACUTE
-	{0x1EEA, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER U WITH HORN AND GRAVE
-	{0x1EEB, 0x0, propertyPVALID},           // LATIN SMALL LETTER U WITH HORN AND GRAVE
-	{0x1EEC, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER U WITH HORN AND HOOK AB
-	{0x1EED, 0x0, propertyPVALID},           // LATIN SMALL LETTER U WITH HORN AND HOOK ABOV
-	{0x1EEE, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER U WITH HORN AND TILDE
-	{0x1EEF, 0x0, propertyPVALID},           // LATIN SMALL LETTER U WITH HORN AND TILDE
-	{0x1EF0, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER U WITH HORN AND DOT BEL
-	{0x1EF1, 0x0, propertyPVALID},           // LATIN SMALL LETTER U WITH HORN AND DOT BELOW
-	{0x1EF2, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER Y WITH GRAVE
-	{0x1EF3, 0x0, propertyPVALID},           // LATIN SMALL LETTER Y WITH GRAVE
-	{0x1EF4, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER Y WITH DOT BELOW
-	{0x1EF5, 0x0, propertyPVALID},           // LATIN SMALL LETTER Y WITH DOT BELOW
-	{0x1EF6, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER Y WITH HOOK ABOVE
-	{0x1EF7, 0x0, propertyPVALID},           // LATIN SMALL LETTER Y WITH HOOK ABOVE
-	{0x1EF8, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER Y WITH TILDE
-	{0x1EF9, 0x0, propertyPVALID},           // LATIN SMALL LETTER Y WITH TILDE
-	{0x1EFA, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER MIDDLE-WELSH LL
-	{0x1EFB, 0x0, propertyPVALID},           // LATIN SMALL LETTER MIDDLE-WELSH LL
-	{0x1EFC, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER MIDDLE-WELSH V
-	{0x1EFD, 0x0, propertyPVALID},           // LATIN SMALL LETTER MIDDLE-WELSH V
-	{0x1EFE, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER Y WITH LOOP
-	{0x1EFF, 0x1F07, propertyPVALID},        // LATIN SMALL LETTER Y WITH LOOP..GREEK SMALL
-	{0x1F08, 0x1F0F, propertyDISALLOWED},    // GREEK CAPITAL LETTER ALPHA WITH PSILI..GREEK
-	{0x1F10, 0x1F15, propertyPVALID},        // GREEK SMALL LETTER EPSILON WITH PSILI..GREEK
-	{0x1F16, 0x1F17, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1F18, 0x1F1D, propertyDISALLOWED},    // GREEK CAPITAL LETTER EPSILON WITH PSILI..GRE
-	{0x1F1E, 0x1F1F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1F20, 0x1F27, propertyPVALID},        // GREEK SMALL LETTER ETA WITH PSILI..GREEK SMA
-	{0x1F28, 0x1F2F, propertyDISALLOWED},    // GREEK CAPITAL LETTER ETA WITH PSILI..GREEK C
-	{0x1F30, 0x1F37, propertyPVALID},        // GREEK SMALL LETTER IOTA WITH PSILI..GREEK SM
-	{0x1F38, 0x1F3F, propertyDISALLOWED},    // GREEK CAPITAL LETTER IOTA WITH PSILI..GREEK
-	{0x1F40, 0x1F45, propertyPVALID},        // GREEK SMALL LETTER OMICRON WITH PSILI..GREEK
-	{0x1F46, 0x1F47, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1F48, 0x1F4D, propertyDISALLOWED},    // GREEK CAPITAL LETTER OMICRON WITH PSILI..GRE
-	{0x1F4E, 0x1F4F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1F50, 0x1F57, propertyPVALID},        // GREEK SMALL LETTER UPSILON WITH PSILI..GREEK
-	{0x1F58, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x1F59, 0x0, propertyDISALLOWED},       // GREEK CAPITAL LETTER UPSILON WITH DASIA
-	{0x1F5A, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x1F5B, 0x0, propertyDISALLOWED},       // GREEK CAPITAL LETTER UPSILON WITH DASIA AND
-	{0x1F5C, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x1F5D, 0x0, propertyDISALLOWED},       // GREEK CAPITAL LETTER UPSILON WITH DASIA AND
-	{0x1F5E, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x1F5F, 0x0, propertyDISALLOWED},       // GREEK CAPITAL LETTER UPSILON WITH DASIA AND
-	{0x1F60, 0x1F67, propertyPVALID},        // GREEK SMALL LETTER OMEGA WITH PSILI..GREEK S
-	{0x1F68, 0x1F6F, propertyDISALLOWED},    // GREEK CAPITAL LETTER OMEGA WITH PSILI..GREEK
-	{0x1F70, 0x0, propertyPVALID},           // GREEK SMALL LETTER ALPHA WITH VARIA
-	{0x1F71, 0x0, propertyDISALLOWED},       // GREEK SMALL LETTER ALPHA WITH OXIA
-	{0x1F72, 0x0, propertyPVALID},           // GREEK SMALL LETTER EPSILON WITH VARIA
-	{0x1F73, 0x0, propertyDISALLOWED},       // GREEK SMALL LETTER EPSILON WITH OXIA
-	{0x1F74, 0x0, propertyPVALID},           // GREEK SMALL LETTER ETA WITH VARIA
-	{0x1F75, 0x0, propertyDISALLOWED},       // GREEK SMALL LETTER ETA WITH OXIA
-	{0x1F76, 0x0, propertyPVALID},           // GREEK SMALL LETTER IOTA WITH VARIA
-	{0x1F77, 0x0, propertyDISALLOWED},       // GREEK SMALL LETTER IOTA WITH OXIA
-	{0x1F78, 0x0, propertyPVALID},           // GREEK SMALL LETTER OMICRON WITH VARIA
-	{0x1F79, 0x0, propertyDISALLOWED},       // GREEK SMALL LETTER OMICRON WITH OXIA
-	{0x1F7A, 0x0, propertyPVALID},           // GREEK SMALL LETTER UPSILON WITH VARIA
-	{0x1F7B, 0x0, propertyDISALLOWED},       // GREEK SMALL LETTER UPSILON WITH OXIA
-	{0x1F7C, 0x0, propertyPVALID},           // GREEK SMALL LETTER OMEGA WITH VARIA
-	{0x1F7D, 0x0, propertyDISALLOWED},       // GREEK SMALL LETTER OMEGA WITH OXIA
-	{0x1F7E, 0x1F7F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1F80, 0x1FAF, propertyDISALLOWED},    // GREEK SMALL LETTER ALPHA WITH PSILI AND YPOG
-	{0x1FB0, 0x1FB1, propertyPVALID},        // GREEK SMALL LETTER ALPHA WITH VRACHY..GREEK
-	{0x1FB2, 0x1FB4, propertyDISALLOWED},    // GREEK SMALL LETTER ALPHA WITH VARIA AND YPOG
-	{0x1FB5, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x1FB6, 0x0, propertyPVALID},           // GREEK SMALL LETTER ALPHA WITH PERISPOMENI
-	{0x1FB7, 0x1FC4, propertyDISALLOWED},    // GREEK SMALL LETTER ALPHA WITH PERISPOMENI AN
-	{0x1FC5, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x1FC6, 0x0, propertyPVALID},           // GREEK SMALL LETTER ETA WITH PERISPOMENI
-	{0x1FC7, 0x1FCF, propertyDISALLOWED},    // GREEK SMALL LETTER ETA WITH PERISPOMENI AND
-	{0x1FD0, 0x1FD2, propertyPVALID},        // GREEK SMALL LETTER IOTA WITH VRACHY..GREEK S
-	{0x1FD3, 0x0, propertyDISALLOWED},       // GREEK SMALL LETTER IOTA WITH DIALYTIKA AND O
-	{0x1FD4, 0x1FD5, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1FD6, 0x1FD7, propertyPVALID},        // GREEK SMALL LETTER IOTA WITH PERISPOMENI..GR
-	{0x1FD8, 0x1FDB, propertyDISALLOWED},    // GREEK CAPITAL LETTER IOTA WITH VRACHY..GREEK
-	{0x1FDC, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x1FDD, 0x1FDF, propertyDISALLOWED},    // GREEK DASIA AND VARIA..GREEK DASIA AND PERIS
-	{0x1FE0, 0x1FE2, propertyPVALID},        // GREEK SMALL LETTER UPSILON WITH VRACHY..GREE
-	{0x1FE3, 0x0, propertyDISALLOWED},       // GREEK SMALL LETTER UPSILON WITH DIALYTIKA AN
-	{0x1FE4, 0x1FE7, propertyPVALID},        // GREEK SMALL LETTER RHO WITH PSILI..GREEK SMA
-	{0x1FE8, 0x1FEF, propertyDISALLOWED},    // GREEK CAPITAL LETTER UPSILON WITH VRACHY..GR
-	{0x1FF0, 0x1FF1, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x1FF2, 0x1FF4, propertyDISALLOWED},    // GREEK SMALL LETTER OMEGA WITH VARIA AND YPOG
-	{0x1FF5, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x1FF6, 0x0, propertyPVALID},           // GREEK SMALL LETTER OMEGA WITH PERISPOMENI
-	{0x1FF7, 0x1FFE, propertyDISALLOWED},    // GREEK SMALL LETTER OMEGA WITH PERISPOMENI AN
-	{0x1FFF, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x2000, 0x200B, propertyDISALLOWED},    // EN QUAD..ZERO WIDTH SPACE
-	{0x200C, 0x200D, propertyCONTEXTJ},      // ZERO WIDTH NON-JOINER..ZERO WIDTH JOINER
-	{0x200E, 0x2064, propertyDISALLOWED},    // LEFT-TO-RIGHT MARK..INVISIBLE PLUS
-	{0x2065, 0x2069, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x206A, 0x2071, propertyDISALLOWED},    // INHIBIT SYMMETRIC SWAPPING..SUPERSCRIPT LATI
-	{0x2072, 0x2073, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x2074, 0x208E, propertyDISALLOWED},    // SUPERSCRIPT FOUR..SUBSCRIPT RIGHT PARENTHESI
-	{0x208F, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x2090, 0x2094, propertyDISALLOWED},    // LATIN SUBSCRIPT SMALL LETTER A..LATIN SUBSCR
-	{0x2095, 0x209F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x20A0, 0x20B8, propertyDISALLOWED},    // EURO-CURRENCY SIGN..TENGE SIGN
-	{0x20B9, 0x20CF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x20D0, 0x20F0, propertyDISALLOWED},    // COMBINING LEFT HARPOON ABOVE..COMBINING ASTE
-	{0x20F1, 0x20FF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x2100, 0x214D, propertyDISALLOWED},    // ACCOUNT OF..AKTIESELSKAB
-	{0x214E, 0x0, propertyPVALID},           // TURNED SMALL F
-	{0x214F, 0x2183, propertyDISALLOWED},    // SYMBOL FOR SAMARITAN SOURCE..ROMAN NUMERAL R
-	{0x2184, 0x0, propertyPVALID},           // LATIN SMALL LETTER REVERSED C
-	{0x2185, 0x2189, propertyDISALLOWED},    // ROMAN NUMERAL SIX LATE FORM..VULGAR FRACTION
-	{0x218A, 0x218F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x2190, 0x23E8, propertyDISALLOWED},    // LEFTWARDS ARROW..DECIMAL EXPONENT SYMBOL
-	{0x23E9, 0x23FF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x2400, 0x2426, propertyDISALLOWED},    // SYMBOL FOR NULL..SYMBOL FOR SUBSTITUTE FORM
-	{0x2427, 0x243F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x2440, 0x244A, propertyDISALLOWED},    // OCR HOOK..OCR DOUBLE BACKSLASH
-	{0x244B, 0x245F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x2460, 0x26CD, propertyDISALLOWED},    // CIRCLED DIGIT ONE..DISABLED CAR
-	{0x26CE, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x26CF, 0x26E1, propertyDISALLOWED},    // PICK..RESTRICTED LEFT ENTRY-2
-	{0x26E2, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x26E3, 0x0, propertyDISALLOWED},       // HEAVY CIRCLE WITH STROKE AND TWO DOTS ABOVE
-	{0x26E4, 0x26E7, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x26E8, 0x26FF, propertyDISALLOWED},    // BLACK CROSS ON SHIELD..WHITE FLAG WITH HORIZ
-	{0x2700, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x2701, 0x2704, propertyDISALLOWED},    // UPPER BLADE SCISSORS..WHITE SCISSORS
-	{0x2705, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x2706, 0x2709, propertyDISALLOWED},    // TELEPHONE LOCATION SIGN..ENVELOPE
-	{0x270A, 0x270B, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x270C, 0x2727, propertyDISALLOWED},    // VICTORY HAND..WHITE FOUR POINTED STAR
-	{0x2728, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x2729, 0x274B, propertyDISALLOWED},    // STRESS OUTLINED WHITE STAR..HEAVY EIGHT TEAR
-	{0x274C, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x274D, 0x0, propertyDISALLOWED},       // SHADOWED WHITE CIRCLE
-	{0x274E, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x274F, 0x2752, propertyDISALLOWED},    // LOWER RIGHT DROP-SHADOWED WHITE SQUARE..UPPE
-	{0x2753, 0x2755, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x2756, 0x275E, propertyDISALLOWED},    // BLACK DIAMOND MINUS WHITE X..HEAVY DOUBLE CO
-	{0x275F, 0x2760, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x2761, 0x2794, propertyDISALLOWED},    // CURVED STEM PARAGRAPH SIGN ORNAMENT..HEAVY W
-	{0x2795, 0x2797, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x2798, 0x27AF, propertyDISALLOWED},    // HEAVY SOUTH EAST ARROW..NOTCHED LOWER RIGHT-
-	{0x27B0, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x27B1, 0x27BE, propertyDISALLOWED},    // NOTCHED UPPER RIGHT-SHADOWED WHITE RIGHTWARD
-	{0x27BF, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x27C0, 0x27CA, propertyDISALLOWED},    // THREE DIMENSIONAL ANGLE..VERTICAL BAR WITH H
-	{0x27CB, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x27CC, 0x0, propertyDISALLOWED},       // LONG DIVISION
-	{0x27CD, 0x27CF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x27D0, 0x2B4C, propertyDISALLOWED},    // WHITE DIAMOND WITH CENTRED DOT..RIGHTWARDS A
-	{0x2B4D, 0x2B4F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x2B50, 0x2B59, propertyDISALLOWED},    // WHITE MEDIUM STAR..HEAVY CIRCLED SALTIRE
-	{0x2B5A, 0x2BFF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x2C00, 0x2C2E, propertyDISALLOWED},    // GLAGOLITIC CAPITAL LETTER AZU..GLAGOLITIC CA
-	{0x2C2F, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x2C30, 0x2C5E, propertyPVALID},        // GLAGOLITIC SMALL LETTER AZU..GLAGOLITIC SMAL
-	{0x2C5F, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x2C60, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER L WITH DOUBLE BAR
-	{0x2C61, 0x0, propertyPVALID},           // LATIN SMALL LETTER L WITH DOUBLE BAR
-	{0x2C62, 0x2C64, propertyDISALLOWED},    // LATIN CAPITAL LETTER L WITH MIDDLE TILDE..LA
-	{0x2C65, 0x2C66, propertyPVALID},        // LATIN SMALL LETTER A WITH STROKE..LATIN SMAL
-	{0x2C67, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER H WITH DESCENDER
-	{0x2C68, 0x0, propertyPVALID},           // LATIN SMALL LETTER H WITH DESCENDER
-	{0x2C69, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER K WITH DESCENDER
-	{0x2C6A, 0x0, propertyPVALID},           // LATIN SMALL LETTER K WITH DESCENDER
-	{0x2C6B, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER Z WITH DESCENDER
-	{0x2C6C, 0x0, propertyPVALID},           // LATIN SMALL LETTER Z WITH DESCENDER
-	{0x2C6D, 0x2C70, propertyDISALLOWED},    // LATIN CAPITAL LETTER ALPHA..LATIN CAPITAL LE
-	{0x2C71, 0x0, propertyPVALID},           // LATIN SMALL LETTER V WITH RIGHT HOOK
-	{0x2C72, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER W WITH HOOK
-	{0x2C73, 0x2C74, propertyPVALID},        // LATIN SMALL LETTER W WITH HOOK..LATIN SMALL
-	{0x2C75, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER HALF H
-	{0x2C76, 0x2C7B, propertyPVALID},        // LATIN SMALL LETTER HALF H..LATIN LETTER SMAL
-	{0x2C7C, 0x2C80, propertyDISALLOWED},    // LATIN SUBSCRIPT SMALL LETTER J..COPTIC CAPIT
-	{0x2C81, 0x0, propertyPVALID},           // COPTIC SMALL LETTER ALFA
-	{0x2C82, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER VIDA
-	{0x2C83, 0x0, propertyPVALID},           // COPTIC SMALL LETTER VIDA
-	{0x2C84, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER GAMMA
-	{0x2C85, 0x0, propertyPVALID},           // COPTIC SMALL LETTER GAMMA
-	{0x2C86, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER DALDA
-	{0x2C87, 0x0, propertyPVALID},           // COPTIC SMALL LETTER DALDA
-	{0x2C88, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER EIE
-	{0x2C89, 0x0, propertyPVALID},           // COPTIC SMALL LETTER EIE
-	{0x2C8A, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER SOU
-	{0x2C8B, 0x0, propertyPVALID},           // COPTIC SMALL LETTER SOU
-	{0x2C8C, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER ZATA
-	{0x2C8D, 0x0, propertyPVALID},           // COPTIC SMALL LETTER ZATA
-	{0x2C8E, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER HATE
-	{0x2C8F, 0x0, propertyPVALID},           // COPTIC SMALL LETTER HATE
-	{0x2C90, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER THETHE
-	{0x2C91, 0x0, propertyPVALID},           // COPTIC SMALL LETTER THETHE
-	{0x2C92, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER IAUDA
-	{0x2C93, 0x0, propertyPVALID},           // COPTIC SMALL LETTER IAUDA
-	{0x2C94, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER KAPA
-	{0x2C95, 0x0, propertyPVALID},           // COPTIC SMALL LETTER KAPA
-	{0x2C96, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER LAULA
-	{0x2C97, 0x0, propertyPVALID},           // COPTIC SMALL LETTER LAULA
-	{0x2C98, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER MI
-	{0x2C99, 0x0, propertyPVALID},           // COPTIC SMALL LETTER MI
-	{0x2C9A, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER NI
-	{0x2C9B, 0x0, propertyPVALID},           // COPTIC SMALL LETTER NI
-	{0x2C9C, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER KSI
-	{0x2C9D, 0x0, propertyPVALID},           // COPTIC SMALL LETTER KSI
-	{0x2C9E, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER O
-	{0x2C9F, 0x0, propertyPVALID},           // COPTIC SMALL LETTER O
-	{0x2CA0, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER PI
-	{0x2CA1, 0x0, propertyPVALID},           // COPTIC SMALL LETTER PI
-	{0x2CA2, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER RO
-	{0x2CA3, 0x0, propertyPVALID},           // COPTIC SMALL LETTER RO
-	{0x2CA4, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER SIMA
-	{0x2CA5, 0x0, propertyPVALID},           // COPTIC SMALL LETTER SIMA
-	{0x2CA6, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER TAU
-	{0x2CA7, 0x0, propertyPVALID},           // COPTIC SMALL LETTER TAU
-	{0x2CA8, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER UA
-	{0x2CA9, 0x0, propertyPVALID},           // COPTIC SMALL LETTER UA
-	{0x2CAA, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER FI
-	{0x2CAB, 0x0, propertyPVALID},           // COPTIC SMALL LETTER FI
-	{0x2CAC, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER KHI
-	{0x2CAD, 0x0, propertyPVALID},           // COPTIC SMALL LETTER KHI
-	{0x2CAE, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER PSI
-	{0x2CAF, 0x0, propertyPVALID},           // COPTIC SMALL LETTER PSI
-	{0x2CB0, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER OOU
-	{0x2CB1, 0x0, propertyPVALID},           // COPTIC SMALL LETTER OOU
-	{0x2CB2, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER DIALECT-P ALEF
-	{0x2CB3, 0x0, propertyPVALID},           // COPTIC SMALL LETTER DIALECT-P ALEF
-	{0x2CB4, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER OLD COPTIC AIN
-	{0x2CB5, 0x0, propertyPVALID},           // COPTIC SMALL LETTER OLD COPTIC AIN
-	{0x2CB6, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER CRYPTOGRAMMIC EIE
-	{0x2CB7, 0x0, propertyPVALID},           // COPTIC SMALL LETTER CRYPTOGRAMMIC EIE
-	{0x2CB8, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER DIALECT-P KAPA
-	{0x2CB9, 0x0, propertyPVALID},           // COPTIC SMALL LETTER DIALECT-P KAPA
-	{0x2CBA, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER DIALECT-P NI
-	{0x2CBB, 0x0, propertyPVALID},           // COPTIC SMALL LETTER DIALECT-P NI
-	{0x2CBC, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER CRYPTOGRAMMIC NI
-	{0x2CBD, 0x0, propertyPVALID},           // COPTIC SMALL LETTER CRYPTOGRAMMIC NI
-	{0x2CBE, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER OLD COPTIC OOU
-	{0x2CBF, 0x0, propertyPVALID},           // COPTIC SMALL LETTER OLD COPTIC OOU
-	{0x2CC0, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER SAMPI
-	{0x2CC1, 0x0, propertyPVALID},           // COPTIC SMALL LETTER SAMPI
-	{0x2CC2, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER CROSSED SHEI
-	{0x2CC3, 0x0, propertyPVALID},           // COPTIC SMALL LETTER CROSSED SHEI
-	{0x2CC4, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER OLD COPTIC SHEI
-	{0x2CC5, 0x0, propertyPVALID},           // COPTIC SMALL LETTER OLD COPTIC SHEI
-	{0x2CC6, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER OLD COPTIC ESH
-	{0x2CC7, 0x0, propertyPVALID},           // COPTIC SMALL LETTER OLD COPTIC ESH
-	{0x2CC8, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER AKHMIMIC KHEI
-	{0x2CC9, 0x0, propertyPVALID},           // COPTIC SMALL LETTER AKHMIMIC KHEI
-	{0x2CCA, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER DIALECT-P HORI
-	{0x2CCB, 0x0, propertyPVALID},           // COPTIC SMALL LETTER DIALECT-P HORI
-	{0x2CCC, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER OLD COPTIC HORI
-	{0x2CCD, 0x0, propertyPVALID},           // COPTIC SMALL LETTER OLD COPTIC HORI
-	{0x2CCE, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER OLD COPTIC HA
-	{0x2CCF, 0x0, propertyPVALID},           // COPTIC SMALL LETTER OLD COPTIC HA
-	{0x2CD0, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER L-SHAPED HA
-	{0x2CD1, 0x0, propertyPVALID},           // COPTIC SMALL LETTER L-SHAPED HA
-	{0x2CD2, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER OLD COPTIC HEI
-	{0x2CD3, 0x0, propertyPVALID},           // COPTIC SMALL LETTER OLD COPTIC HEI
-	{0x2CD4, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER OLD COPTIC HAT
-	{0x2CD5, 0x0, propertyPVALID},           // COPTIC SMALL LETTER OLD COPTIC HAT
-	{0x2CD6, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER OLD COPTIC GANGIA
-	{0x2CD7, 0x0, propertyPVALID},           // COPTIC SMALL LETTER OLD COPTIC GANGIA
-	{0x2CD8, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER OLD COPTIC DJA
-	{0x2CD9, 0x0, propertyPVALID},           // COPTIC SMALL LETTER OLD COPTIC DJA
-	{0x2CDA, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER OLD COPTIC SHIMA
-	{0x2CDB, 0x0, propertyPVALID},           // COPTIC SMALL LETTER OLD COPTIC SHIMA
-	{0x2CDC, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER OLD NUBIAN SHIMA
-	{0x2CDD, 0x0, propertyPVALID},           // COPTIC SMALL LETTER OLD NUBIAN SHIMA
-	{0x2CDE, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER OLD NUBIAN NGI
-	{0x2CDF, 0x0, propertyPVALID},           // COPTIC SMALL LETTER OLD NUBIAN NGI
-	{0x2CE0, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER OLD NUBIAN NYI
-	{0x2CE1, 0x0, propertyPVALID},           // COPTIC SMALL LETTER OLD NUBIAN NYI
-	{0x2CE2, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER OLD NUBIAN WAU
-	{0x2CE3, 0x2CE4, propertyPVALID},        // COPTIC SMALL LETTER OLD NUBIAN WAU..COPTIC S
-	{0x2CE5, 0x2CEB, propertyDISALLOWED},    // COPTIC SYMBOL MI RO..COPTIC CAPITAL LETTER C
-	{0x2CEC, 0x0, propertyPVALID},           // COPTIC SMALL LETTER CRYPTOGRAMMIC SHEI
-	{0x2CED, 0x0, propertyDISALLOWED},       // COPTIC CAPITAL LETTER CRYPTOGRAMMIC GANGIA
-	{0x2CEE, 0x2CF1, propertyPVALID},        // COPTIC SMALL LETTER CRYPTOGRAMMIC GANGIA..CO
-	{0x2CF2, 0x2CF8, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x2CF9, 0x2CFF, propertyDISALLOWED},    // COPTIC OLD NUBIAN FULL STOP..COPTIC MORPHOLO
-	{0x2D00, 0x2D25, propertyPVALID},        // GEORGIAN SMALL LETTER AN..GEORGIAN SMALL LET
-	{0x2D26, 0x2D2F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x2D30, 0x2D65, propertyPVALID},        // TIFINAGH LETTER YA..TIFINAGH LETTER YAZZ
-	{0x2D66, 0x2D6E, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x2D6F, 0x0, propertyDISALLOWED},       // TIFINAGH MODIFIER LETTER LABIALIZATION MARK
-	{0x2D70, 0x2D7F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x2D80, 0x2D96, propertyPVALID},        // ETHIOPIC SYLLABLE LOA..ETHIOPIC SYLLABLE GGW
-	{0x2D97, 0x2D9F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x2DA0, 0x2DA6, propertyPVALID},        // ETHIOPIC SYLLABLE SSA..ETHIOPIC SYLLABLE SSO
-	{0x2DA7, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x2DA8, 0x2DAE, propertyPVALID},        // ETHIOPIC SYLLABLE CCA..ETHIOPIC SYLLABLE CCO
-	{0x2DAF, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x2DB0, 0x2DB6, propertyPVALID},        // ETHIOPIC SYLLABLE ZZA..ETHIOPIC SYLLABLE ZZO
-	{0x2DB7, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x2DB8, 0x2DBE, propertyPVALID},        // ETHIOPIC SYLLABLE CCHA..ETHIOPIC SYLLABLE CC
-	{0x2DBF, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x2DC0, 0x2DC6, propertyPVALID},        // ETHIOPIC SYLLABLE QYA..ETHIOPIC SYLLABLE QYO
-	{0x2DC7, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x2DC8, 0x2DCE, propertyPVALID},        // ETHIOPIC SYLLABLE KYA..ETHIOPIC SYLLABLE KYO
-	{0x2DCF, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x2DD0, 0x2DD6, propertyPVALID},        // ETHIOPIC SYLLABLE XYA..ETHIOPIC SYLLABLE XYO
-	{0x2DD7, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x2DD8, 0x2DDE, propertyPVALID},        // ETHIOPIC SYLLABLE GYA..ETHIOPIC SYLLABLE GYO
-	{0x2DDF, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x2DE0, 0x2DFF, propertyPVALID},        // COMBINING CYRILLIC LETTER BE..COMBINING CYRI
-	{0x2E00, 0x2E2E, propertyDISALLOWED},    // RIGHT ANGLE SUBSTITUTION MARKER..REVERSED QU
-	{0x2E2F, 0x0, propertyPVALID},           // VERTICAL TILDE
-	{0x2E30, 0x2E31, propertyDISALLOWED},    // RING POINT..WORD SEPARATOR MIDDLE DOT
-	{0x2E32, 0x2E7F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x2E80, 0x2E99, propertyDISALLOWED},    // CJK RADICAL REPEAT..CJK RADICAL RAP
-	{0x2E9A, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x2E9B, 0x2EF3, propertyDISALLOWED},    // CJK RADICAL CHOKE..CJK RADICAL C-SIMPLIFIED
-	{0x2EF4, 0x2EFF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x2F00, 0x2FD5, propertyDISALLOWED},    // KANGXI RADICAL ONE..KANGXI RADICAL FLUTE
-	{0x2FD6, 0x2FEF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x2FF0, 0x2FFB, propertyDISALLOWED},    // IDEOGRAPHIC DESCRIPTION CHARACTER LEFT TO RI
-	{0x2FFC, 0x2FFF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x3000, 0x3004, propertyDISALLOWED},    // IDEOGRAPHIC SPACE..JAPANESE INDUSTRIAL STAND
-	{0x3005, 0x3007, propertyPVALID},        // IDEOGRAPHIC ITERATION MARK..IDEOGRAPHIC NUMB
-	{0x3008, 0x3029, propertyDISALLOWED},    // LEFT ANGLE BRACKET..HANGZHOU NUMERAL NINE
-	{0x302A, 0x302D, propertyPVALID},        // IDEOGRAPHIC LEVEL TONE MARK..IDEOGRAPHIC ENT
-	{0x302E, 0x303B, propertyDISALLOWED},    // HANGUL SINGLE DOT TONE MARK..VERTICAL IDEOGR
-	{0x303C, 0x0, propertyPVALID},           // MASU MARK
-	{0x303D, 0x303F, propertyDISALLOWED},    // PART ALTERNATION MARK..IDEOGRAPHIC HALF FILL
-	{0x3040, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x3041, 0x3096, propertyPVALID},        // HIRAGANA LETTER SMALL A..HIRAGANA LETTER SMA
-	{0x3097, 0x3098, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x3099, 0x309A, propertyPVALID},        // COMBINING KATAKANA-HIRAGANA VOICED SOUND MAR
-	{0x309B, 0x309C, propertyDISALLOWED},    // KATAKANA-HIRAGANA VOICED SOUND MARK..KATAKAN
-	{0x309D, 0x309E, propertyPVALID},        // HIRAGANA ITERATION MARK..HIRAGANA VOICED ITE
-	{0x309F, 0x30A0, propertyDISALLOWED},    // HIRAGANA DIGRAPH YORI..KATAKANA-HIRAGANA DOU
-	{0x30A1, 0x30FA, propertyPVALID},        // KATAKANA LETTER SMALL A..KATAKANA LETTER VO
-	{0x30FB, 0x0, propertyCONTEXTO},         // KATAKANA MIDDLE DOT
-	{0x30FC, 0x30FE, propertyPVALID},        // KATAKANA-HIRAGANA PROLONGED SOUND MARK..KATA
-	{0x30FF, 0x0, propertyDISALLOWED},       // KATAKANA DIGRAPH KOTO
-	{0x3100, 0x3104, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x3105, 0x312D, propertyPVALID},        // BOPOMOFO LETTER B..BOPOMOFO LETTER IH
-	{0x312E, 0x3130, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x3131, 0x318E, propertyDISALLOWED},    // HANGUL LETTER KIYEOK..HANGUL LETTER ARAEAE
-	{0x318F, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x3190, 0x319F, propertyDISALLOWED},    // IDEOGRAPHIC ANNOTATION LINKING MARK..IDEOGRA
-	{0x31A0, 0x31B7, propertyPVALID},        // BOPOMOFO LETTER BU..BOPOMOFO FINAL LETTER H
-	{0x31B8, 0x31BF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x31C0, 0x31E3, propertyDISALLOWED},    // CJK STROKE T..CJK STROKE Q
-	{0x31E4, 0x31EF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x31F0, 0x31FF, propertyPVALID},        // KATAKANA LETTER SMALL KU..KATAKANA LETTER SM
-	{0x3200, 0x321E, propertyDISALLOWED},    // PARENTHESIZED HANGUL KIYEOK..PARENTHESIZED K
-	{0x321F, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x3220, 0x32FE, propertyDISALLOWED},    // PARENTHESIZED IDEOGRAPH ONE..CIRCLED KATAKAN
-	{0x32FF, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0x3300, 0x33FF, propertyDISALLOWED},    // SQUARE APAATO..SQUARE GAL
-	{0x3400, 0x4DB5, propertyPVALID},        // <CJK Ideograph Extension A>..<CJK Ideograph
-	{0x4DB6, 0x4DBF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0x4DC0, 0x4DFF, propertyDISALLOWED},    // HEXAGRAM FOR THE CREATIVE HEAVEN..HEXAGRAM F
-	{0x4E00, 0x9FCB, propertyPVALID},        // <CJK Ideograph>..<CJK Ideograph>
-	{0x9FCC, 0x9FFF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xA000, 0xA48C, propertyPVALID},        // YI SYLLABLE IT..YI SYLLABLE YYR
-	{0xA48D, 0xA48F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xA490, 0xA4C6, propertyDISALLOWED},    // YI RADICAL QOT..YI RADICAL KE
-	{0xA4C7, 0xA4CF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xA4D0, 0xA4FD, propertyPVALID},        // LISU LETTER BA..LISU LETTER TONE MYA JEU
-	{0xA4FE, 0xA4FF, propertyDISALLOWED},    // LISU PUNCTUATION COMMA..LISU PUNCTUATION FUL
-	{0xA500, 0xA60C, propertyPVALID},        // VAI SYLLABLE EE..VAI SYLLABLE LENGTHENER
-	{0xA60D, 0xA60F, propertyDISALLOWED},    // VAI COMMA..VAI QUESTION MARK
-	{0xA610, 0xA62B, propertyPVALID},        // VAI SYLLABLE NDOLE FA..VAI SYLLABLE NDOLE DO
-	{0xA62C, 0xA63F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xA640, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER ZEMLYA
-	{0xA641, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER ZEMLYA
-	{0xA642, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER DZELO
-	{0xA643, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER DZELO
-	{0xA644, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER REVERSED DZE
-	{0xA645, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER REVERSED DZE
-	{0xA646, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER IOTA
-	{0xA647, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER IOTA
-	{0xA648, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER DJERV
-	{0xA649, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER DJERV
-	{0xA64A, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER MONOGRAPH UK
-	{0xA64B, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER MONOGRAPH UK
-	{0xA64C, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER BROAD OMEGA
-	{0xA64D, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER BROAD OMEGA
-	{0xA64E, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER NEUTRAL YER
-	{0xA64F, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER NEUTRAL YER
-	{0xA650, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER YERU WITH BACK YER
-	{0xA651, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER YERU WITH BACK YER
-	{0xA652, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER IOTIFIED YAT
-	{0xA653, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER IOTIFIED YAT
-	{0xA654, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER REVERSED YU
-	{0xA655, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER REVERSED YU
-	{0xA656, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER IOTIFIED A
-	{0xA657, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER IOTIFIED A
-	{0xA658, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER CLOSED LITTLE YUS
-	{0xA659, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER CLOSED LITTLE YUS
-	{0xA65A, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER BLENDED YUS
-	{0xA65B, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER BLENDED YUS
-	{0xA65C, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER IOTIFIED CLOSED LITT
-	{0xA65D, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER IOTIFIED CLOSED LITTLE
-	{0xA65E, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER YN
-	{0xA65F, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER YN
-	{0xA660, 0xA661, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xA662, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER SOFT DE
-	{0xA663, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER SOFT DE
-	{0xA664, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER SOFT EL
-	{0xA665, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER SOFT EL
-	{0xA666, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER SOFT EM
-	{0xA667, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER SOFT EM
-	{0xA668, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER MONOCULAR O
-	{0xA669, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER MONOCULAR O
-	{0xA66A, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER BINOCULAR O
-	{0xA66B, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER BINOCULAR O
-	{0xA66C, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER DOUBLE MONOCULAR O
-	{0xA66D, 0xA66F, propertyPVALID},        // CYRILLIC SMALL LETTER DOUBLE MONOCULAR O..CO
-	{0xA670, 0xA673, propertyDISALLOWED},    // COMBINING CYRILLIC TEN MILLIONS SIGN..SLAVON
-	{0xA674, 0xA67B, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xA67C, 0xA67D, propertyPVALID},        // COMBINING CYRILLIC KAVYKA..COMBINING CYRILLI
-	{0xA67E, 0x0, propertyDISALLOWED},       // CYRILLIC KAVYKA
-	{0xA67F, 0x0, propertyPVALID},           // CYRILLIC PAYEROK
-	{0xA680, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER DWE
-	{0xA681, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER DWE
-	{0xA682, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER DZWE
-	{0xA683, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER DZWE
-	{0xA684, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER ZHWE
-	{0xA685, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER ZHWE
-	{0xA686, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER CCHE
-	{0xA687, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER CCHE
-	{0xA688, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER DZZE
-	{0xA689, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER DZZE
-	{0xA68A, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER TE WITH MIDDLE HOOK
-	{0xA68B, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER TE WITH MIDDLE HOOK
-	{0xA68C, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER TWE
-	{0xA68D, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER TWE
-	{0xA68E, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER TSWE
-	{0xA68F, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER TSWE
-	{0xA690, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER TSSE
-	{0xA691, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER TSSE
-	{0xA692, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER TCHE
-	{0xA693, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER TCHE
-	{0xA694, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER HWE
-	{0xA695, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER HWE
-	{0xA696, 0x0, propertyDISALLOWED},       // CYRILLIC CAPITAL LETTER SHWE
-	{0xA697, 0x0, propertyPVALID},           // CYRILLIC SMALL LETTER SHWE
-	{0xA698, 0xA69F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xA6A0, 0xA6E5, propertyPVALID},        // BAMUM LETTER A..BAMUM LETTER KI
-	{0xA6E6, 0xA6EF, propertyDISALLOWED},    // BAMUM LETTER MO..BAMUM LETTER KOGHOM
-	{0xA6F0, 0xA6F1, propertyPVALID},        // BAMUM COMBINING MARK KOQNDON..BAMUM COMBININ
-	{0xA6F2, 0xA6F7, propertyDISALLOWED},    // BAMUM NJAEMLI..BAMUM QUESTION MARK
-	{0xA6F8, 0xA6FF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xA700, 0xA716, propertyDISALLOWED},    // MODIFIER LETTER CHINESE TONE YIN PING..MODIF
-	{0xA717, 0xA71F, propertyPVALID},        // MODIFIER LETTER DOT VERTICAL BAR..MODIFIER L
-	{0xA720, 0xA722, propertyDISALLOWED},    // MODIFIER LETTER STRESS AND HIGH TONE..LATIN
-	{0xA723, 0x0, propertyPVALID},           // LATIN SMALL LETTER EGYPTOLOGICAL ALEF
-	{0xA724, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER EGYPTOLOGICAL AIN
-	{0xA725, 0x0, propertyPVALID},           // LATIN SMALL LETTER EGYPTOLOGICAL AIN
-	{0xA726, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER HENG
-	{0xA727, 0x0, propertyPVALID},           // LATIN SMALL LETTER HENG
-	{0xA728, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER TZ
-	{0xA729, 0x0, propertyPVALID},           // LATIN SMALL LETTER TZ
-	{0xA72A, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER TRESILLO
-	{0xA72B, 0x0, propertyPVALID},           // LATIN SMALL LETTER TRESILLO
-	{0xA72C, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER CUATRILLO
-	{0xA72D, 0x0, propertyPVALID},           // LATIN SMALL LETTER CUATRILLO
-	{0xA72E, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER CUATRILLO WITH COMMA
-	{0xA72F, 0xA731, propertyPVALID},        // LATIN SMALL LETTER CUATRILLO WITH COMMA..LAT
-	{0xA732, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER AA
-	{0xA733, 0x0, propertyPVALID},           // LATIN SMALL LETTER AA
-	{0xA734, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER AO
-	{0xA735, 0x0, propertyPVALID},           // LATIN SMALL LETTER AO
-	{0xA736, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER AU
-	{0xA737, 0x0, propertyPVALID},           // LATIN SMALL LETTER AU
-	{0xA738, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER AV
-	{0xA739, 0x0, propertyPVALID},           // LATIN SMALL LETTER AV
-	{0xA73A, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER AV WITH HORIZONTAL BAR
-	{0xA73B, 0x0, propertyPVALID},           // LATIN SMALL LETTER AV WITH HORIZONTAL BAR
-	{0xA73C, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER AY
-	{0xA73D, 0x0, propertyPVALID},           // LATIN SMALL LETTER AY
-	{0xA73E, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER REVERSED C WITH DOT
-	{0xA73F, 0x0, propertyPVALID},           // LATIN SMALL LETTER REVERSED C WITH DOT
-	{0xA740, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER K WITH STROKE
-	{0xA741, 0x0, propertyPVALID},           // LATIN SMALL LETTER K WITH STROKE
-	{0xA742, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER K WITH DIAGONAL STROKE
-	{0xA743, 0x0, propertyPVALID},           // LATIN SMALL LETTER K WITH DIAGONAL STROKE
-	{0xA744, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER K WITH STROKE AND DIAGO
-	{0xA745, 0x0, propertyPVALID},           // LATIN SMALL LETTER K WITH STROKE AND DIAGONA
-	{0xA746, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER BROKEN L
-	{0xA747, 0x0, propertyPVALID},           // LATIN SMALL LETTER BROKEN L
-	{0xA748, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER L WITH HIGH STROKE
-	{0xA749, 0x0, propertyPVALID},           // LATIN SMALL LETTER L WITH HIGH STROKE
-	{0xA74A, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH LONG STROKE OVER
-	{0xA74B, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH LONG STROKE OVERLA
-	{0xA74C, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER O WITH LOOP
-	{0xA74D, 0x0, propertyPVALID},           // LATIN SMALL LETTER O WITH LOOP
-	{0xA74E, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER OO
-	{0xA74F, 0x0, propertyPVALID},           // LATIN SMALL LETTER OO
-	{0xA750, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER P WITH STROKE THROUGH D
-	{0xA751, 0x0, propertyPVALID},           // LATIN SMALL LETTER P WITH STROKE THROUGH DES
-	{0xA752, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER P WITH FLOURISH
-	{0xA753, 0x0, propertyPVALID},           // LATIN SMALL LETTER P WITH FLOURISH
-	{0xA754, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER P WITH SQUIRREL TAIL
-	{0xA755, 0x0, propertyPVALID},           // LATIN SMALL LETTER P WITH SQUIRREL TAIL
-	{0xA756, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER Q WITH STROKE THROUGH D
-	{0xA757, 0x0, propertyPVALID},           // LATIN SMALL LETTER Q WITH STROKE THROUGH DES
-	{0xA758, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER Q WITH DIAGONAL STROKE
-	{0xA759, 0x0, propertyPVALID},           // LATIN SMALL LETTER Q WITH DIAGONAL STROKE
-	{0xA75A, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER R ROTUNDA
-	{0xA75B, 0x0, propertyPVALID},           // LATIN SMALL LETTER R ROTUNDA
-	{0xA75C, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER RUM ROTUNDA
-	{0xA75D, 0x0, propertyPVALID},           // LATIN SMALL LETTER RUM ROTUNDA
-	{0xA75E, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER V WITH DIAGONAL STROKE
-	{0xA75F, 0x0, propertyPVALID},           // LATIN SMALL LETTER V WITH DIAGONAL STROKE
-	{0xA760, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER VY
-	{0xA761, 0x0, propertyPVALID},           // LATIN SMALL LETTER VY
-	{0xA762, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER VISIGOTHIC Z
-	{0xA763, 0x0, propertyPVALID},           // LATIN SMALL LETTER VISIGOTHIC Z
-	{0xA764, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER THORN WITH STROKE
-	{0xA765, 0x0, propertyPVALID},           // LATIN SMALL LETTER THORN WITH STROKE
-	{0xA766, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER THORN WITH STROKE THROU
-	{0xA767, 0x0, propertyPVALID},           // LATIN SMALL LETTER THORN WITH STROKE THROUGH
-	{0xA768, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER VEND
-	{0xA769, 0x0, propertyPVALID},           // LATIN SMALL LETTER VEND
-	{0xA76A, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER ET
-	{0xA76B, 0x0, propertyPVALID},           // LATIN SMALL LETTER ET
-	{0xA76C, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER IS
-	{0xA76D, 0x0, propertyPVALID},           // LATIN SMALL LETTER IS
-	{0xA76E, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER CON
-	{0xA76F, 0x0, propertyPVALID},           // LATIN SMALL LETTER CON
-	{0xA770, 0x0, propertyDISALLOWED},       // MODIFIER LETTER US
-	{0xA771, 0xA778, propertyPVALID},        // LATIN SMALL LETTER DUM..LATIN SMALL LETTER U
-	{0xA779, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER INSULAR D
-	{0xA77A, 0x0, propertyPVALID},           // LATIN SMALL LETTER INSULAR D
-	{0xA77B, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER INSULAR F
-	{0xA77C, 0x0, propertyPVALID},           // LATIN SMALL LETTER INSULAR F
-	{0xA77D, 0xA77E, propertyDISALLOWED},    // LATIN CAPITAL LETTER INSULAR G..LATIN CAPITA
-	{0xA77F, 0x0, propertyPVALID},           // LATIN SMALL LETTER TURNED INSULAR G
-	{0xA780, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER TURNED L
-	{0xA781, 0x0, propertyPVALID},           // LATIN SMALL LETTER TURNED L
-	{0xA782, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER INSULAR R
-	{0xA783, 0x0, propertyPVALID},           // LATIN SMALL LETTER INSULAR R
-	{0xA784, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER INSULAR S
-	{0xA785, 0x0, propertyPVALID},           // LATIN SMALL LETTER INSULAR S
-	{0xA786, 0x0, propertyDISALLOWED},       // LATIN CAPITAL LETTER INSULAR T
-	{0xA787, 0xA788, propertyPVALID},        // LATIN SMALL LETTER INSULAR T..MODIFIER LETTE
-	{0xA789, 0xA78B, propertyDISALLOWED},    // MODIFIER LETTER COLON..LATIN CAPITAL LETTER
-	{0xA78C, 0x0, propertyPVALID},           // LATIN SMALL LETTER SALTILLO
-	{0xA78D, 0xA7FA, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xA7FB, 0xA827, propertyPVALID},        // LATIN EPIGRAPHIC LETTER REVERSED F..SYLOTI N
-	{0xA828, 0xA82B, propertyDISALLOWED},    // SYLOTI NAGRI POETRY MARK-1..SYLOTI NAGRI POE
-	{0xA82C, 0xA82F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xA830, 0xA839, propertyDISALLOWED},    // NORTH INDIC FRACTION ONE QUARTER..NORTH INDI
-	{0xA83A, 0xA83F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xA840, 0xA873, propertyPVALID},        // PHAGS-PA LETTER KA..PHAGS-PA LETTER CANDRABI
-	{0xA874, 0xA877, propertyDISALLOWED},    // PHAGS-PA SINGLE HEAD MARK..PHAGS-PA MARK DOU
-	{0xA878, 0xA87F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xA880, 0xA8C4, propertyPVALID},        // SAURASHTRA SIGN ANUSVARA..SAURASHTRA SIGN VI
-	{0xA8C5, 0xA8CD, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xA8CE, 0xA8CF, propertyDISALLOWED},    // SAURASHTRA DANDA..SAURASHTRA DOUBLE DANDA
-	{0xA8D0, 0xA8D9, propertyPVALID},        // SAURASHTRA DIGIT ZERO..SAURASHTRA DIGIT NINE
-	{0xA8DA, 0xA8DF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xA8E0, 0xA8F7, propertyPVALID},        // COMBINING DEVANAGARI DIGIT ZERO..DEVANAGARI
-	{0xA8F8, 0xA8FA, propertyDISALLOWED},    // DEVANAGARI SIGN PUSHPIKA..DEVANAGARI CARET
-	{0xA8FB, 0x0, propertyPVALID},           // DEVANAGARI HEADSTROKE
-	{0xA8FC, 0xA8FF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xA900, 0xA92D, propertyPVALID},        // KAYAH LI DIGIT ZERO..KAYAH LI TONE CALYA PLO
-	{0xA92E, 0xA92F, propertyDISALLOWED},    // KAYAH LI SIGN CWI..KAYAH LI SIGN SHYA
-	{0xA930, 0xA953, propertyPVALID},        // REJANG LETTER KA..REJANG VIRAMA
-	{0xA954, 0xA95E, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xA95F, 0xA97C, propertyDISALLOWED},    // REJANG SECTION MARK..HANGUL CHOSEONG SSANGYE
-	{0xA97D, 0xA97F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xA980, 0xA9C0, propertyPVALID},        // JAVANESE SIGN PANYANGGA..JAVANESE PANGKON
-	{0xA9C1, 0xA9CD, propertyDISALLOWED},    // JAVANESE LEFT RERENGGAN..JAVANESE TURNED PAD
-	{0xA9CE, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0xA9CF, 0xA9D9, propertyPVALID},        // JAVANESE PANGRANGKEP..JAVANESE DIGIT NINE
-	{0xA9DA, 0xA9DD, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xA9DE, 0xA9DF, propertyDISALLOWED},    // JAVANESE PADA TIRTA TUMETES..JAVANESE PADA I
-	{0xA9E0, 0xA9FF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xAA00, 0xAA36, propertyPVALID},        // CHAM LETTER A..CHAM CONSONANT SIGN WA
-	{0xAA37, 0xAA3F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xAA40, 0xAA4D, propertyPVALID},        // CHAM LETTER FINAL K..CHAM CONSONANT SIGN FIN
-	{0xAA4E, 0xAA4F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xAA50, 0xAA59, propertyPVALID},        // CHAM DIGIT ZERO..CHAM DIGIT NINE
-	{0xAA5A, 0xAA5B, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xAA5C, 0xAA5F, propertyDISALLOWED},    // CHAM PUNCTUATION SPIRAL..CHAM PUNCTUATION TR
-	{0xAA60, 0xAA76, propertyPVALID},        // MYANMAR LETTER KHAMTI GA..MYANMAR LOGOGRAM K
-	{0xAA77, 0xAA79, propertyDISALLOWED},    // MYANMAR SYMBOL AITON EXCLAMATION..MYANMAR SY
-	{0xAA7A, 0xAA7B, propertyPVALID},        // MYANMAR LETTER AITON RA..MYANMAR SIGN PAO KA
-	{0xAA7C, 0xAA7F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xAA80, 0xAAC2, propertyPVALID},        // TAI VIET LETTER LOW KO..TAI VIET TONE MAI SO
-	{0xAAC3, 0xAADA, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xAADB, 0xAADD, propertyPVALID},        // TAI VIET SYMBOL KON..TAI VIET SYMBOL SAM
-	{0xAADE, 0xAADF, propertyDISALLOWED},    // TAI VIET SYMBOL HO HOI..TAI VIET SYMBOL KOI
-	{0xAAE0, 0xABBF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xABC0, 0xABEA, propertyPVALID},        // MEETEI MAYEK LETTER KOK..MEETEI MAYEK VOWEL
-	{0xABEB, 0x0, propertyDISALLOWED},       // MEETEI MAYEK CHEIKHEI
-	{0xABEC, 0xABED, propertyPVALID},        // MEETEI MAYEK LUM IYEK..MEETEI MAYEK APUN IYE
-	{0xABEE, 0xABEF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xABF0, 0xABF9, propertyPVALID},        // MEETEI MAYEK DIGIT ZERO..MEETEI MAYEK DIGIT
-	{0xABFA, 0xABFF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xAC00, 0xD7A3, propertyPVALID},        // <Hangul Syllable>..<Hangul Syllable>
-	{0xD7A4, 0xD7AF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xD7B0, 0xD7C6, propertyDISALLOWED},    // HANGUL JUNGSEONG O-YEO..HANGUL JUNGSEONG ARA
-	{0xD7C7, 0xD7CA, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xD7CB, 0xD7FB, propertyDISALLOWED},    // HANGUL JONGSEONG NIEUN-RIEUL..HANGUL JONGSEO
-	{0xD7FC, 0xD7FF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xD800, 0xFA0D, propertyDISALLOWED},    // <Non Private Use High Surrogate>..CJK COMPAT
-	{0xFA0E, 0xFA0F, propertyPVALID},        // CJK COMPATIBILITY IDEOGRAPH-FA0E..CJK COMPAT
-	{0xFA10, 0x0, propertyDISALLOWED},       // CJK COMPATIBILITY IDEOGRAPH-FA10
-	{0xFA11, 0x0, propertyPVALID},           // CJK COMPATIBILITY IDEOGRAPH-FA11
-	{0xFA12, 0x0, propertyDISALLOWED},       // CJK COMPATIBILITY IDEOGRAPH-FA12
-	{0xFA13, 0xFA14, propertyPVALID},        // CJK COMPATIBILITY IDEOGRAPH-FA13..CJK COMPAT
-	{0xFA15, 0xFA1E, propertyDISALLOWED},    // CJK COMPATIBILITY IDEOGRAPH-FA15..CJK COMPAT
-	{0xFA1F, 0x0, propertyPVALID},           // CJK COMPATIBILITY IDEOGRAPH-FA1F
-	{0xFA20, 0x0, propertyDISALLOWED},       // CJK COMPATIBILITY IDEOGRAPH-FA20
-	{0xFA21, 0x0, propertyPVALID},           // CJK COMPATIBILITY IDEOGRAPH-FA21
-	{0xFA22, 0x0, propertyDISALLOWED},       // CJK COMPATIBILITY IDEOGRAPH-FA22
-	{0xFA23, 0xFA24, propertyPVALID},        // CJK COMPATIBILITY IDEOGRAPH-FA23..CJK COMPAT
-	{0xFA25, 0xFA26, propertyDISALLOWED},    // CJK COMPATIBILITY IDEOGRAPH-FA25..CJK COMPAT
-	{0xFA27, 0xFA29, propertyPVALID},        // CJK COMPATIBILITY IDEOGRAPH-FA27..CJK COMPAT
-	{0xFA2A, 0xFA2D, propertyDISALLOWED},    // CJK COMPATIBILITY IDEOGRAPH-FA2A..CJK COMPAT
-	{0xFA2E, 0xFA2F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xFA30, 0xFA6D, propertyDISALLOWED},    // CJK COMPATIBILITY IDEOGRAPH-FA30..CJK COMPAT
-	{0xFA6E, 0xFA6F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xFA70, 0xFAD9, propertyDISALLOWED},    // CJK COMPATIBILITY IDEOGRAPH-FA70..CJK COMPAT
-	{0xFADA, 0xFAFF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xFB00, 0xFB06, propertyDISALLOWED},    // LATIN SMALL LIGATURE FF..LATIN SMALL LIGATUR
-	{0xFB07, 0xFB12, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xFB13, 0xFB17, propertyDISALLOWED},    // ARMENIAN SMALL LIGATURE MEN NOW..ARMENIAN SM
-	{0xFB18, 0xFB1C, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xFB1D, 0x0, propertyDISALLOWED},       // HEBREW LETTER YOD WITH HIRIQ
-	{0xFB1E, 0x0, propertyPVALID},           // HEBREW POINT JUDEO-SPANISH VARIKA
-	{0xFB1F, 0xFB36, propertyDISALLOWED},    // HEBREW LIGATURE YIDDISH YOD YOD PATAH..HEBRE
-	{0xFB37, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0xFB38, 0xFB3C, propertyDISALLOWED},    // HEBREW LETTER TET WITH DAGESH..HEBREW LETTER
-	{0xFB3D, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0xFB3E, 0x0, propertyDISALLOWED},       // HEBREW LETTER MEM WITH DAGESH
-	{0xFB3F, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0xFB40, 0xFB41, propertyDISALLOWED},    // HEBREW LETTER NUN WITH DAGESH..HEBREW LETTER
-	{0xFB42, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0xFB43, 0xFB44, propertyDISALLOWED},    // HEBREW LETTER FINAL PE WITH DAGESH..HEBREW L
-	{0xFB45, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0xFB46, 0xFBB1, propertyDISALLOWED},    // HEBREW LETTER TSADI WITH DAGESH..ARABIC LETT
-	{0xFBB2, 0xFBD2, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xFBD3, 0xFD3F, propertyDISALLOWED},    // ARABIC LETTER NG ISOLATED FORM..ORNATE RIGHT
-	{0xFD40, 0xFD4F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xFD50, 0xFD8F, propertyDISALLOWED},    // ARABIC LIGATURE TEH WITH JEEM WITH MEEM INIT
-	{0xFD90, 0xFD91, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xFD92, 0xFDC7, propertyDISALLOWED},    // ARABIC LIGATURE MEEM WITH JEEM WITH KHAH INI
-	{0xFDC8, 0xFDCF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xFDD0, 0xFDFD, propertyDISALLOWED},    // <noncharacter>..ARABIC LIGATURE BISMILLAH AR
-	{0xFDFE, 0xFDFF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xFE00, 0xFE19, propertyDISALLOWED},    // VARIATION SELECTOR-1..PRESENTATION FORM FOR
-	{0xFE1A, 0xFE1F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xFE20, 0xFE26, propertyPVALID},        // COMBINING LIGATURE LEFT HALF..COMBINING CONJ
-	{0xFE27, 0xFE2F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xFE30, 0xFE52, propertyDISALLOWED},    // PRESENTATION FORM FOR VERTICAL TWO DOT LEADE
-	{0xFE53, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0xFE54, 0xFE66, propertyDISALLOWED},    // SMALL SEMICOLON..SMALL EQUALS SIGN
-	{0xFE67, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0xFE68, 0xFE6B, propertyDISALLOWED},    // SMALL REVERSE SOLIDUS..SMALL COMMERCIAL AT
-	{0xFE6C, 0xFE6F, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xFE70, 0xFE72, propertyDISALLOWED},    // ARABIC FATHATAN ISOLATED FORM..ARABIC DAMMAT
-	{0xFE73, 0x0, propertyPVALID},           // ARABIC TAIL FRAGMENT
-	{0xFE74, 0x0, propertyDISALLOWED},       // ARABIC KASRATAN ISOLATED FORM
-	{0xFE75, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0xFE76, 0xFEFC, propertyDISALLOWED},    // ARABIC FATHA ISOLATED FORM..ARABIC LIGATURE
-	{0xFEFD, 0xFEFE, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xFEFF, 0x0, propertyDISALLOWED},       // ZERO WIDTH NO-BREAK SPACE
-	{0xFF00, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0xFF01, 0xFFBE, propertyDISALLOWED},    // FULLWIDTH EXCLAMATION MARK..HALFWIDTH HANGUL
-	{0xFFBF, 0xFFC1, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xFFC2, 0xFFC7, propertyDISALLOWED},    // HALFWIDTH HANGUL LETTER A..HALFWIDTH HANGUL
-	{0xFFC8, 0xFFC9, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xFFCA, 0xFFCF, propertyDISALLOWED},    // HALFWIDTH HANGUL LETTER YEO..HALFWIDTH HANGU
-	{0xFFD0, 0xFFD1, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xFFD2, 0xFFD7, propertyDISALLOWED},    // HALFWIDTH HANGUL LETTER YO..HALFWIDTH HANGUL
-	{0xFFD8, 0xFFD9, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xFFDA, 0xFFDC, propertyDISALLOWED},    // HALFWIDTH HANGUL LETTER EU..HALFWIDTH HANGUL
-	{0xFFDD, 0xFFDF, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xFFE0, 0xFFE6, propertyDISALLOWED},    // FULLWIDTH CENT SIGN..FULLWIDTH WON SIGN
-	{0xFFE7, 0x0, propertyUNASSIGNED},       // <reserved>
-	{0xFFE8, 0xFFEE, propertyDISALLOWED},    // HALFWIDTH FORMS LIGHT VERTICAL..HALFWIDTH WH
-	{0xFFEF, 0xFFF8, propertyUNASSIGNED},    // <reserved>..<reserved>
-	{0xFFF9, 0xFFFF, propertyDISALLOWED},    // INTERLINEAR ANNOTATION ANCHOR..<noncharacter
-	{0x10000, 0x1000B, propertyPVALID},      // LINEAR B SYLLABLE B008 A..LINEAR B SYLLABLE
-	{0x1000C, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x1000D, 0x10026, propertyPVALID},      // LINEAR B SYLLABLE B036 JO..LINEAR B SYLLABLE
-	{0x10027, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x10028, 0x1003A, propertyPVALID},      // LINEAR B SYLLABLE B060 RA..LINEAR B SYLLABLE
-	{0x1003B, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x1003C, 0x1003D, propertyPVALID},      // LINEAR B SYLLABLE B017 ZA..LINEAR B SYLLABLE
-	{0x1003E, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x1003F, 0x1004D, propertyPVALID},      // LINEAR B SYLLABLE B020 ZO..LINEAR B SYLLABLE
-	{0x1004E, 0x1004F, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10050, 0x1005D, propertyPVALID},      // LINEAR B SYMBOL B018..LINEAR B SYMBOL B089
-	{0x1005E, 0x1007F, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10080, 0x100FA, propertyPVALID},      // LINEAR B IDEOGRAM B100 MAN..LINEAR B IDEOGRA
-	{0x100FB, 0x100FF, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10100, 0x10102, propertyDISALLOWED},  // AEGEAN WORD SEPARATOR LINE..AEGEAN CHECK MAR
-	{0x10103, 0x10106, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10107, 0x10133, propertyDISALLOWED},  // AEGEAN NUMBER ONE..AEGEAN NUMBER NINETY THOU
-	{0x10134, 0x10136, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10137, 0x1018A, propertyDISALLOWED},  // AEGEAN WEIGHT BASE UNIT..GREEK ZERO SIGN
-	{0x1018B, 0x1018F, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10190, 0x1019B, propertyDISALLOWED},  // ROMAN SEXTANS SIGN..ROMAN CENTURIAL SIGN
-	{0x1019C, 0x101CF, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x101D0, 0x101FC, propertyDISALLOWED},  // PHAISTOS DISC SIGN PEDESTRIAN..PHAISTOS DISC
-	{0x101FD, 0x0, propertyPVALID},          // PHAISTOS DISC SIGN COMBINING OBLIQUE STROKE
-	{0x101FE, 0x1027F, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10280, 0x1029C, propertyPVALID},      // LYCIAN LETTER A..LYCIAN LETTER X
-	{0x1029D, 0x1029F, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x102A0, 0x102D0, propertyPVALID},      // CARIAN LETTER A..CARIAN LETTER UUU3
-	{0x102D1, 0x102FF, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10300, 0x1031E, propertyPVALID},      // OLD ITALIC LETTER A..OLD ITALIC LETTER UU
-	{0x1031F, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x10320, 0x10323, propertyDISALLOWED},  // OLD ITALIC NUMERAL ONE..OLD ITALIC NUMERAL F
-	{0x10324, 0x1032F, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10330, 0x10340, propertyPVALID},      // GOTHIC LETTER AHSA..GOTHIC LETTER PAIRTHRA
-	{0x10341, 0x0, propertyDISALLOWED},      // GOTHIC LETTER NINETY
-	{0x10342, 0x10349, propertyPVALID},      // GOTHIC LETTER RAIDA..GOTHIC LETTER OTHAL
-	{0x1034A, 0x0, propertyDISALLOWED},      // GOTHIC LETTER NINE HUNDRED
-	{0x1034B, 0x1037F, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10380, 0x1039D, propertyPVALID},      // UGARITIC LETTER ALPA..UGARITIC LETTER SSU
-	{0x1039E, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x1039F, 0x0, propertyDISALLOWED},      // UGARITIC WORD DIVIDER
-	{0x103A0, 0x103C3, propertyPVALID},      // OLD PERSIAN SIGN A..OLD PERSIAN SIGN HA
-	{0x103C4, 0x103C7, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x103C8, 0x103CF, propertyPVALID},      // OLD PERSIAN SIGN AURAMAZDAA..OLD PERSIAN SIG
-	{0x103D0, 0x103D5, propertyDISALLOWED},  // OLD PERSIAN WORD DIVIDER..OLD PERSIAN NUMBER
-	{0x103D6, 0x103FF, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10400, 0x10427, propertyDISALLOWED},  // DESERET CAPITAL LETTER LONG I..DESERET CAPIT
-	{0x10428, 0x1049D, propertyPVALID},      // DESERET SMALL LETTER LONG I..OSMANYA LETTER
-	{0x1049E, 0x1049F, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x104A0, 0x104A9, propertyPVALID},      // OSMANYA DIGIT ZERO..OSMANYA DIGIT NINE
-	{0x104AA, 0x107FF, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10800, 0x10805, propertyPVALID},      // CYPRIOT SYLLABLE A..CYPRIOT SYLLABLE JA
-	{0x10806, 0x10807, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10808, 0x0, propertyPVALID},          // CYPRIOT SYLLABLE JO
-	{0x10809, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x1080A, 0x10835, propertyPVALID},      // CYPRIOT SYLLABLE KA..CYPRIOT SYLLABLE WO
-	{0x10836, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x10837, 0x10838, propertyPVALID},      // CYPRIOT SYLLABLE XA..CYPRIOT SYLLABLE XE
-	{0x10839, 0x1083B, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1083C, 0x0, propertyPVALID},          // CYPRIOT SYLLABLE ZA
-	{0x1083D, 0x1083E, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1083F, 0x10855, propertyPVALID},      // CYPRIOT SYLLABLE ZO..IMPERIAL ARAMAIC LETTER
-	{0x10856, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x10857, 0x1085F, propertyDISALLOWED},  // IMPERIAL ARAMAIC SECTION SIGN..IMPERIAL ARAM
-	{0x10860, 0x108FF, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10900, 0x10915, propertyPVALID},      // PHOENICIAN LETTER ALF..PHOENICIAN LETTER TAU
-	{0x10916, 0x1091B, propertyDISALLOWED},  // PHOENICIAN NUMBER ONE..PHOENICIAN NUMBER THR
-	{0x1091C, 0x1091E, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1091F, 0x0, propertyDISALLOWED},      // PHOENICIAN WORD SEPARATOR
-	{0x10920, 0x10939, propertyPVALID},      // LYDIAN LETTER A..LYDIAN LETTER C
-	{0x1093A, 0x1093E, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1093F, 0x0, propertyDISALLOWED},      // LYDIAN TRIANGULAR MARK
-	{0x10940, 0x109FF, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10A00, 0x10A03, propertyPVALID},      // KHAROSHTHI LETTER A..KHAROSHTHI VOWEL SIGN V
-	{0x10A04, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x10A05, 0x10A06, propertyPVALID},      // KHAROSHTHI VOWEL SIGN E..KHAROSHTHI VOWEL SI
-	{0x10A07, 0x10A0B, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10A0C, 0x10A13, propertyPVALID},      // KHAROSHTHI VOWEL LENGTH MARK..KHAROSHTHI LET
-	{0x10A14, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x10A15, 0x10A17, propertyPVALID},      // KHAROSHTHI LETTER CA..KHAROSHTHI LETTER JA
-	{0x10A18, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x10A19, 0x10A33, propertyPVALID},      // KHAROSHTHI LETTER NYA..KHAROSHTHI LETTER TTT
-	{0x10A34, 0x10A37, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10A38, 0x10A3A, propertyPVALID},      // KHAROSHTHI SIGN BAR ABOVE..KHAROSHTHI SIGN D
-	{0x10A3B, 0x10A3E, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10A3F, 0x0, propertyPVALID},          // KHAROSHTHI VIRAMA
-	{0x10A40, 0x10A47, propertyDISALLOWED},  // KHAROSHTHI DIGIT ONE..KHAROSHTHI NUMBER ONE
-	{0x10A48, 0x10A4F, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10A50, 0x10A58, propertyDISALLOWED},  // KHAROSHTHI PUNCTUATION DOT..KHAROSHTHI PUNCT
-	{0x10A59, 0x10A5F, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10A60, 0x10A7C, propertyPVALID},      // OLD SOUTH ARABIAN LETTER HE..OLD SOUTH ARABI
-	{0x10A7D, 0x10A7F, propertyDISALLOWED},  // OLD SOUTH ARABIAN NUMBER ONE..OLD SOUTH ARAB
-	{0x10A80, 0x10AFF, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10B00, 0x10B35, propertyPVALID},      // AVESTAN LETTER A..AVESTAN LETTER HE
-	{0x10B36, 0x10B38, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10B39, 0x10B3F, propertyDISALLOWED},  // AVESTAN ABBREVIATION MARK..LARGE ONE RING OV
-	{0x10B40, 0x10B55, propertyPVALID},      // INSCRIPTIONAL PARTHIAN LETTER ALEPH..INSCRIP
-	{0x10B56, 0x10B57, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10B58, 0x10B5F, propertyDISALLOWED},  // INSCRIPTIONAL PARTHIAN NUMBER ONE..INSCRIPTI
-	{0x10B60, 0x10B72, propertyPVALID},      // INSCRIPTIONAL PAHLAVI LETTER ALEPH..INSCRIPT
-	{0x10B73, 0x10B77, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10B78, 0x10B7F, propertyDISALLOWED},  // INSCRIPTIONAL PAHLAVI NUMBER ONE..INSCRIPTIO
-	{0x10B80, 0x10BFF, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10C00, 0x10C48, propertyPVALID},      // OLD TURKIC LETTER ORKHON A..OLD TURKIC LETTE
-	{0x10C49, 0x10E5F, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x10E60, 0x10E7E, propertyDISALLOWED},  // RUMI DIGIT ONE..RUMI FRACTION TWO THIRDS
-	{0x10E7F, 0x1107F, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x11080, 0x110BA, propertyPVALID},      // KAITHI SIGN CANDRABINDU..KAITHI SIGN NUKTA
-	{0x110BB, 0x110C1, propertyDISALLOWED},  // KAITHI ABBREVIATION SIGN..KAITHI DOUBLE DAND
-	{0x110C2, 0x11FFF, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x12000, 0x1236E, propertyPVALID},      // CUNEIFORM SIGN A..CUNEIFORM SIGN ZUM
-	{0x1236F, 0x123FF, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x12400, 0x12462, propertyDISALLOWED},  // CUNEIFORM NUMERIC SIGN TWO ASH..CUNEIFORM NU
-	{0x12463, 0x1246F, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x12470, 0x12473, propertyDISALLOWED},  // CUNEIFORM PUNCTUATION SIGN OLD ASSYRIAN WORD
-	{0x12474, 0x12FFF, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x13000, 0x1342E, propertyPVALID},      // EGYPTIAN HIEROGLYPH A001..EGYPTIAN HIEROGLYP
-	{0x1342F, 0x1CFFF, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1D000, 0x1D0F5, propertyDISALLOWED},  // BYZANTINE MUSICAL SYMBOL PSILI..BYZANTINE MU
-	{0x1D0F6, 0x1D0FF, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1D100, 0x1D126, propertyDISALLOWED},  // MUSICAL SYMBOL SINGLE BARLINE..MUSICAL SYMBO
-	{0x1D127, 0x1D128, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1D129, 0x1D1DD, propertyDISALLOWED},  // MUSICAL SYMBOL MULTIPLE MEASURE REST..MUSICA
-	{0x1D1DE, 0x1D1FF, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1D200, 0x1D245, propertyDISALLOWED},  // GREEK VOCAL NOTATION SYMBOL-1..GREEK MUSICAL
-	{0x1D246, 0x1D2FF, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1D300, 0x1D356, propertyDISALLOWED},  // MONOGRAM FOR EARTH..TETRAGRAM FOR FOSTERING
-	{0x1D357, 0x1D35F, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1D360, 0x1D371, propertyDISALLOWED},  // COUNTING ROD UNIT DIGIT ONE..COUNTING ROD TE
-	{0x1D372, 0x1D3FF, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1D400, 0x1D454, propertyDISALLOWED},  // MATHEMATICAL BOLD CAPITAL A..MATHEMATICAL IT
-	{0x1D455, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x1D456, 0x1D49C, propertyDISALLOWED},  // MATHEMATICAL ITALIC SMALL I..MATHEMATICAL SC
-	{0x1D49D, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x1D49E, 0x1D49F, propertyDISALLOWED},  // MATHEMATICAL SCRIPT CAPITAL C..MATHEMATICAL
-	{0x1D4A0, 0x1D4A1, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1D4A2, 0x0, propertyDISALLOWED},      // MATHEMATICAL SCRIPT CAPITAL G
-	{0x1D4A3, 0x1D4A4, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1D4A5, 0x1D4A6, propertyDISALLOWED},  // MATHEMATICAL SCRIPT CAPITAL J..MATHEMATICAL
-	{0x1D4A7, 0x1D4A8, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1D4A9, 0x1D4AC, propertyDISALLOWED},  // MATHEMATICAL SCRIPT CAPITAL N..MATHEMATICAL
-	{0x1D4AD, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x1D4AE, 0x1D4B9, propertyDISALLOWED},  // MATHEMATICAL SCRIPT CAPITAL S..MATHEMATICAL
-	{0x1D4BA, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x1D4BB, 0x0, propertyDISALLOWED},      // MATHEMATICAL SCRIPT SMALL F
-	{0x1D4BC, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x1D4BD, 0x1D4C3, propertyDISALLOWED},  // MATHEMATICAL SCRIPT SMALL H..MATHEMATICAL SC
-	{0x1D4C4, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x1D4C5, 0x1D505, propertyDISALLOWED},  // MATHEMATICAL SCRIPT SMALL P..MATHEMATICAL FR
-	{0x1D506, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x1D507, 0x1D50A, propertyDISALLOWED},  // MATHEMATICAL FRAKTUR CAPITAL D..MATHEMATICAL
-	{0x1D50B, 0x1D50C, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1D50D, 0x1D514, propertyDISALLOWED},  // MATHEMATICAL FRAKTUR CAPITAL J..MATHEMATICAL
-	{0x1D515, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x1D516, 0x1D51C, propertyDISALLOWED},  // MATHEMATICAL FRAKTUR CAPITAL S..MATHEMATICAL
-	{0x1D51D, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x1D51E, 0x1D539, propertyDISALLOWED},  // MATHEMATICAL FRAKTUR SMALL A..MATHEMATICAL D
-	{0x1D53A, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x1D53B, 0x1D53E, propertyDISALLOWED},  // MATHEMATICAL DOUBLE-STRUCK CAPITAL D..MATHEM
-	{0x1D53F, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x1D540, 0x1D544, propertyDISALLOWED},  // MATHEMATICAL DOUBLE-STRUCK CAPITAL I..MATHEM
-	{0x1D545, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x1D546, 0x0, propertyDISALLOWED},      // MATHEMATICAL DOUBLE-STRUCK CAPITAL O
-	{0x1D547, 0x1D549, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1D54A, 0x1D550, propertyDISALLOWED},  // MATHEMATICAL DOUBLE-STRUCK CAPITAL S..MATHEM
-	{0x1D551, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x1D552, 0x1D6A5, propertyDISALLOWED},  // MATHEMATICAL DOUBLE-STRUCK SMALL A..MATHEMAT
-	{0x1D6A6, 0x1D6A7, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1D6A8, 0x1D7CB, propertyDISALLOWED},  // MATHEMATICAL BOLD CAPITAL ALPHA..MATHEMATICA
-	{0x1D7CC, 0x1D7CD, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1D7CE, 0x1D7FF, propertyDISALLOWED},  // MATHEMATICAL BOLD DIGIT ZERO..MATHEMATICAL M
-	{0x1D800, 0x1EFFF, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1F000, 0x1F02B, propertyDISALLOWED},  // MAHJONG TILE EAST WIND..MAHJONG TILE BACK
-	{0x1F02C, 0x1F02F, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1F030, 0x1F093, propertyDISALLOWED},  // DOMINO TILE HORIZONTAL BACK..DOMINO TILE VER
-	{0x1F094, 0x1F0FF, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1F100, 0x1F10A, propertyDISALLOWED},  // DIGIT ZERO FULL STOP..DIGIT NINE COMMA
-	{0x1F10B, 0x1F10F, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1F110, 0x1F12E, propertyDISALLOWED},  // PARENTHESIZED LATIN CAPITAL LETTER A..CIRCLE
-	{0x1F12F, 0x1F130, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1F131, 0x0, propertyDISALLOWED},      // SQUARED LATIN CAPITAL LETTER B
-	{0x1F132, 0x1F13C, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1F13D, 0x0, propertyDISALLOWED},      // SQUARED LATIN CAPITAL LETTER N
-	{0x1F13E, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x1F13F, 0x0, propertyDISALLOWED},      // SQUARED LATIN CAPITAL LETTER P
-	{0x1F140, 0x1F141, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1F142, 0x0, propertyDISALLOWED},      // SQUARED LATIN CAPITAL LETTER S
-	{0x1F143, 0x1F145, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1F146, 0x0, propertyDISALLOWED},      // SQUARED LATIN CAPITAL LETTER W
-	{0x1F147, 0x1F149, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1F14A, 0x1F14E, propertyDISALLOWED},  // SQUARED HV..SQUARED PPV
-	{0x1F14F, 0x1F156, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1F157, 0x0, propertyDISALLOWED},      // NEGATIVE CIRCLED LATIN CAPITAL LETTER H
-	{0x1F158, 0x1F15E, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1F15F, 0x0, propertyDISALLOWED},      // NEGATIVE CIRCLED LATIN CAPITAL LETTER P
-	{0x1F160, 0x1F178, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1F179, 0x0, propertyDISALLOWED},      // NEGATIVE SQUARED LATIN CAPITAL LETTER J
-	{0x1F17A, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0x1F17B, 0x1F17C, propertyDISALLOWED},  // NEGATIVE SQUARED LATIN CAPITAL LETTER L..NEG
-	{0x1F17D, 0x1F17E, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1F17F, 0x0, propertyDISALLOWED},      // NEGATIVE SQUARED LATIN CAPITAL LETTER P
-	{0x1F180, 0x1F189, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1F18A, 0x1F18D, propertyDISALLOWED},  // CROSSED NEGATIVE SQUARED LATIN CAPITAL LETTE
-	{0x1F18E, 0x1F18F, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1F190, 0x0, propertyDISALLOWED},      // SQUARE DJ
-	{0x1F191, 0x1F1FF, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1F200, 0x0, propertyDISALLOWED},      // SQUARE HIRAGANA HOKA
-	{0x1F201, 0x1F20F, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1F210, 0x1F231, propertyDISALLOWED},  // SQUARED CJK UNIFIED IDEOGRAPH-624B..SQUARED
-	{0x1F232, 0x1F23F, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1F240, 0x1F248, propertyDISALLOWED},  // TORTOISE SHELL BRACKETED CJK UNIFIED IDEOGRA
-	{0x1F249, 0x1FFFD, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x1FFFE, 0x1FFFF, propertyDISALLOWED},  // <noncharacter>..<noncharacter>
-	{0x20000, 0x2A6D6, propertyPVALID},      // <CJK Ideograph Extension B>..<CJK Ideograph
-	{0x2A6D7, 0x2A6FF, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x2A700, 0x2B734, propertyPVALID},      // <CJK Ideograph Extension C>..<CJK Ideograph
-	{0x2B735, 0x2F7FF, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x2F800, 0x2FA1D, propertyDISALLOWED},  // CJK COMPATIBILITY IDEOGRAPH-2F800..CJK COMPA
-	{0x2FA1E, 0x2FFFD, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x2FFFE, 0x2FFFF, propertyDISALLOWED},  // <noncharacter>..<noncharacter>
-	{0x30000, 0x3FFFD, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x3FFFE, 0x3FFFF, propertyDISALLOWED},  // <noncharacter>..<noncharacter>
-	{0x40000, 0x4FFFD, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x4FFFE, 0x4FFFF, propertyDISALLOWED},  // <noncharacter>..<noncharacter>
-	{0x50000, 0x5FFFD, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x5FFFE, 0x5FFFF, propertyDISALLOWED},  // <noncharacter>..<noncharacter>
-	{0x60000, 0x6FFFD, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x6FFFE, 0x6FFFF, propertyDISALLOWED},  // <noncharacter>..<noncharacter>
-	{0x70000, 0x7FFFD, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x7FFFE, 0x7FFFF, propertyDISALLOWED},  // <noncharacter>..<noncharacter>
-	{0x80000, 0x8FFFD, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x8FFFE, 0x8FFFF, propertyDISALLOWED},  // <noncharacter>..<noncharacter>
-	{0x90000, 0x9FFFD, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0x9FFFE, 0x9FFFF, propertyDISALLOWED},  // <noncharacter>..<noncharacter>
-	{0xA0000, 0xAFFFD, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0xAFFFE, 0xAFFFF, propertyDISALLOWED},  // <noncharacter>..<noncharacter>
-	{0xB0000, 0xBFFFD, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0xBFFFE, 0xBFFFF, propertyDISALLOWED},  // <noncharacter>..<noncharacter>
-	{0xC0000, 0xCFFFD, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0xCFFFE, 0xCFFFF, propertyDISALLOWED},  // <noncharacter>..<noncharacter>
-	{0xD0000, 0xDFFFD, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0xDFFFE, 0xDFFFF, propertyDISALLOWED},  // <noncharacter>..<noncharacter>
-	{0xE0000, 0x0, propertyUNASSIGNED},      // <reserved>
-	{0xE0001, 0x0, propertyDISALLOWED},      // LANGUAGE TAG
-	{0xE0002, 0xE001F, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0xE0020, 0xE007F, propertyDISALLOWED},  // TAG SPACE..CANCEL TAG
-	{0xE0080, 0xE00FF, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0xE0100, 0xE01EF, propertyDISALLOWED},  // VARIATION SELECTOR-17..VARIATION SELECTOR-25
-	{0xE01F0, 0xEFFFD, propertyUNASSIGNED},  // <reserved>..<reserved>
-	{0xEFFFE, 0x10FFFF, propertyDISALLOWED}, // <noncharacter>..<noncharacter>
-}

+ 0 - 18
vendor/github.com/miekg/dns/idn/example_test.go

@@ -1,18 +0,0 @@
-package idn_test
-
-import (
-	"fmt"
-	"github.com/miekg/dns/idn"
-)
-
-func ExampleToPunycode() {
-	name := "インターネット.テスト"
-	fmt.Printf("%s -> %s", name, idn.ToPunycode(name))
-	// Output: インターネット.テスト -> xn--eckucmux0ukc.xn--zckzah
-}
-
-func ExampleFromPunycode() {
-	name := "xn--mgbaja8a1hpac.xn--mgbachtv"
-	fmt.Printf("%s -> %s", name, idn.FromPunycode(name))
-	// Output: xn--mgbaja8a1hpac.xn--mgbachtv -> الانترنت.اختبار
-}

+ 0 - 373
vendor/github.com/miekg/dns/idn/punycode.go

@@ -1,373 +0,0 @@
-// Package idn implements encoding from and to punycode as speficied by RFC 3492.
-package idn
-
-import (
-	"bytes"
-	"strings"
-	"unicode"
-	"unicode/utf8"
-
-	"github.com/miekg/dns"
-)
-
-// Implementation idea from RFC itself and from from IDNA::Punycode created by
-// Tatsuhiko Miyagawa <[email protected]> and released under Perl Artistic
-// License in 2002.
-
-const (
-	_MIN  rune = 1
-	_MAX  rune = 26
-	_SKEW rune = 38
-	_BASE rune = 36
-	_BIAS rune = 72
-	_N    rune = 128
-	_DAMP rune = 700
-
-	_DELIMITER = '-'
-	_PREFIX    = "xn--"
-)
-
-// ToPunycode converts unicode domain names to DNS-appropriate punycode names.
-// This function will return an empty string result for domain names with
-// invalid unicode strings. This function expects domain names in lowercase.
-func ToPunycode(s string) string {
-	// Early check to see if encoding is needed.
-	// This will prevent making heap allocations when not needed.
-	if !needToPunycode(s) {
-		return s
-	}
-
-	tokens := dns.SplitDomainName(s)
-	switch {
-	case s == "":
-		return ""
-	case tokens == nil: // s == .
-		return "."
-	case s[len(s)-1] == '.':
-		tokens = append(tokens, "")
-	}
-
-	for i := range tokens {
-		t := encode([]byte(tokens[i]))
-		if t == nil {
-			return ""
-		}
-		tokens[i] = string(t)
-	}
-	return strings.Join(tokens, ".")
-}
-
-// FromPunycode returns unicode domain name from provided punycode string.
-// This function expects punycode strings in lowercase.
-func FromPunycode(s string) string {
-	// Early check to see if decoding is needed.
-	// This will prevent making heap allocations when not needed.
-	if !needFromPunycode(s) {
-		return s
-	}
-
-	tokens := dns.SplitDomainName(s)
-	switch {
-	case s == "":
-		return ""
-	case tokens == nil: // s == .
-		return "."
-	case s[len(s)-1] == '.':
-		tokens = append(tokens, "")
-	}
-	for i := range tokens {
-		tokens[i] = string(decode([]byte(tokens[i])))
-	}
-	return strings.Join(tokens, ".")
-}
-
-// digitval converts single byte into meaningful value that's used to calculate decoded unicode character.
-const errdigit = 0xffff
-
-func digitval(code rune) rune {
-	switch {
-	case code >= 'A' && code <= 'Z':
-		return code - 'A'
-	case code >= 'a' && code <= 'z':
-		return code - 'a'
-	case code >= '0' && code <= '9':
-		return code - '0' + 26
-	}
-	return errdigit
-}
-
-// lettercode finds BASE36 byte (a-z0-9) based on calculated number.
-func lettercode(digit rune) rune {
-	switch {
-	case digit >= 0 && digit <= 25:
-		return digit + 'a'
-	case digit >= 26 && digit <= 36:
-		return digit - 26 + '0'
-	}
-	panic("dns: not reached")
-}
-
-// adapt calculates next bias to be used for next iteration delta.
-func adapt(delta rune, numpoints int, firsttime bool) rune {
-	if firsttime {
-		delta /= _DAMP
-	} else {
-		delta /= 2
-	}
-
-	var k rune
-	for delta = delta + delta/rune(numpoints); delta > (_BASE-_MIN)*_MAX/2; k += _BASE {
-		delta /= _BASE - _MIN
-	}
-
-	return k + ((_BASE-_MIN+1)*delta)/(delta+_SKEW)
-}
-
-// next finds minimal rune (one with lowest codepoint value) that should be equal or above boundary.
-func next(b []rune, boundary rune) rune {
-	if len(b) == 0 {
-		panic("dns: invalid set of runes to determine next one")
-	}
-	m := b[0]
-	for _, x := range b[1:] {
-		if x >= boundary && (m < boundary || x < m) {
-			m = x
-		}
-	}
-	return m
-}
-
-// preprune converts unicode rune to lower case. At this time it's not
-// supporting all things described in RFCs.
-func preprune(r rune) rune {
-	if unicode.IsUpper(r) {
-		r = unicode.ToLower(r)
-	}
-	return r
-}
-
-// tfunc is a function that helps calculate each character weight.
-func tfunc(k, bias rune) rune {
-	switch {
-	case k <= bias:
-		return _MIN
-	case k >= bias+_MAX:
-		return _MAX
-	}
-	return k - bias
-}
-
-// needToPunycode returns true for strings that require punycode encoding
-// (contain unicode characters).
-func needToPunycode(s string) bool {
-	// This function is very similar to bytes.Runes. We don't use bytes.Runes
-	// because it makes a heap allocation that's not needed here.
-	for i := 0; len(s) > 0; i++ {
-		r, l := utf8.DecodeRuneInString(s)
-		if r > 0x7f {
-			return true
-		}
-		s = s[l:]
-	}
-	return false
-}
-
-// needFromPunycode returns true for strings that require punycode decoding.
-func needFromPunycode(s string) bool {
-	if s == "." {
-		return false
-	}
-
-	off := 0
-	end := false
-	pl := len(_PREFIX)
-	sl := len(s)
-
-	// If s starts with _PREFIX.
-	if sl > pl && s[off:off+pl] == _PREFIX {
-		return true
-	}
-
-	for {
-		// Find the part after the next ".".
-		off, end = dns.NextLabel(s, off)
-		if end {
-			return false
-		}
-		// If this parts starts with _PREFIX.
-		if sl-off > pl && s[off:off+pl] == _PREFIX {
-			return true
-		}
-	}
-}
-
-// encode transforms Unicode input bytes (that represent DNS label) into
-// punycode bytestream. This function would return nil if there's an invalid
-// character in the label.
-func encode(input []byte) []byte {
-	n, bias := _N, _BIAS
-
-	b := bytes.Runes(input)
-	for i := range b {
-		if !isValidRune(b[i]) {
-			return nil
-		}
-
-		b[i] = preprune(b[i])
-	}
-
-	basic := make([]byte, 0, len(b))
-	for _, ltr := range b {
-		if ltr <= 0x7f {
-			basic = append(basic, byte(ltr))
-		}
-	}
-	basiclen := len(basic)
-	fulllen := len(b)
-	if basiclen == fulllen {
-		return basic
-	}
-
-	var out bytes.Buffer
-
-	out.WriteString(_PREFIX)
-	if basiclen > 0 {
-		out.Write(basic)
-		out.WriteByte(_DELIMITER)
-	}
-
-	var (
-		ltr, nextltr rune
-		delta, q     rune // delta calculation (see rfc)
-		t, k, cp     rune // weight and codepoint calculation
-	)
-
-	s := &bytes.Buffer{}
-	for h := basiclen; h < fulllen; n, delta = n+1, delta+1 {
-		nextltr = next(b, n)
-		s.Truncate(0)
-		s.WriteRune(nextltr)
-		delta, n = delta+(nextltr-n)*rune(h+1), nextltr
-
-		for _, ltr = range b {
-			if ltr < n {
-				delta++
-			}
-			if ltr == n {
-				q = delta
-				for k = _BASE; ; k += _BASE {
-					t = tfunc(k, bias)
-					if q < t {
-						break
-					}
-					cp = t + ((q - t) % (_BASE - t))
-					out.WriteRune(lettercode(cp))
-					q = (q - t) / (_BASE - t)
-				}
-
-				out.WriteRune(lettercode(q))
-
-				bias = adapt(delta, h+1, h == basiclen)
-				h, delta = h+1, 0
-			}
-		}
-	}
-	return out.Bytes()
-}
-
-// decode transforms punycode input bytes (that represent DNS label) into Unicode bytestream.
-func decode(b []byte) []byte {
-	src := b // b would move and we need to keep it
-
-	n, bias := _N, _BIAS
-	if !bytes.HasPrefix(b, []byte(_PREFIX)) {
-		return b
-	}
-	out := make([]rune, 0, len(b))
-	b = b[len(_PREFIX):]
-	for pos := len(b) - 1; pos >= 0; pos-- {
-		// only last delimiter is our interest
-		if b[pos] == _DELIMITER {
-			out = append(out, bytes.Runes(b[:pos])...)
-			b = b[pos+1:] // trim source string
-			break
-		}
-	}
-	if len(b) == 0 {
-		return src
-	}
-	var (
-		i, oldi, w rune
-		ch         byte
-		t, digit   rune
-		ln         int
-	)
-
-	for i = 0; len(b) > 0; i++ {
-		oldi, w = i, 1
-		for k := _BASE; len(b) > 0; k += _BASE {
-			ch, b = b[0], b[1:]
-			digit = digitval(rune(ch))
-			if digit == errdigit {
-				return src
-			}
-			i += digit * w
-			if i < 0 {
-				// safety check for rune overflow
-				return src
-			}
-
-			t = tfunc(k, bias)
-			if digit < t {
-				break
-			}
-
-			w *= _BASE - t
-		}
-		ln = len(out) + 1
-		bias = adapt(i-oldi, ln, oldi == 0)
-		n += i / rune(ln)
-		i = i % rune(ln)
-		// insert
-		out = append(out, 0)
-		copy(out[i+1:], out[i:])
-		out[i] = n
-	}
-
-	var ret bytes.Buffer
-	for _, r := range out {
-		ret.WriteRune(r)
-	}
-	return ret.Bytes()
-}
-
-// isValidRune checks if the character is valid. We will look for the
-// character property in the code points list. For now we aren't checking special
-// rules in case of contextual property
-func isValidRune(r rune) bool {
-	return findProperty(r) == propertyPVALID
-}
-
-// findProperty will try to check the code point property of the given
-// character. It will use a binary search algorithm as we have a slice of
-// ordered ranges (average case performance O(log n))
-func findProperty(r rune) property {
-	imin, imax := 0, len(codePoints)
-
-	for imax >= imin {
-		imid := (imin + imax) / 2
-
-		codePoint := codePoints[imid]
-		if (codePoint.start == r && codePoint.end == 0) || (codePoint.start <= r && codePoint.end >= r) {
-			return codePoint.state
-		}
-
-		if (codePoint.end > 0 && codePoint.end < r) || (codePoint.end == 0 && codePoint.start < r) {
-			imin = imid + 1
-		} else {
-			imax = imid - 1
-		}
-	}
-
-	return propertyUnknown
-}

+ 0 - 116
vendor/github.com/miekg/dns/idn/punycode_test.go

@@ -1,116 +0,0 @@
-package idn
-
-import (
-	"strings"
-	"testing"
-)
-
-var testcases = [][2]string{
-	{"", ""},
-	{"a", "a"},
-	{"a-b", "a-b"},
-	{"a-b-c", "a-b-c"},
-	{"abc", "abc"},
-	{"я", "xn--41a"},
-	{"zя", "xn--z-0ub"},
-	{"яZ", "xn--z-zub"},
-	{"а-я", "xn----7sb8g"},
-	{"إختبار", "xn--kgbechtv"},
-	{"آزمایشی", "xn--hgbk6aj7f53bba"},
-	{"测试", "xn--0zwm56d"},
-	{"測試", "xn--g6w251d"},
-	{"испытание", "xn--80akhbyknj4f"},
-	{"परीक्षा", "xn--11b5bs3a9aj6g"},
-	{"δοκιμή", "xn--jxalpdlp"},
-	{"테스트", "xn--9t4b11yi5a"},
-	{"טעסט", "xn--deba0ad"},
-	{"テスト", "xn--zckzah"},
-	{"பரிட்சை", "xn--hlcj6aya9esc7a"},
-	{"mamão-com-açúcar", "xn--mamo-com-acar-yeb1e6q"},
-	{"σ", "xn--4xa"},
-}
-
-func TestEncodeDecodePunycode(t *testing.T) {
-	for _, tst := range testcases {
-		enc := encode([]byte(tst[0]))
-		if string(enc) != tst[1] {
-			t.Errorf("%s encodeded as %s but should be %s", tst[0], enc, tst[1])
-		}
-		dec := decode([]byte(tst[1]))
-		if string(dec) != strings.ToLower(tst[0]) {
-			t.Errorf("%s decoded as %s but should be %s", tst[1], dec, strings.ToLower(tst[0]))
-		}
-	}
-}
-
-func TestToFromPunycode(t *testing.T) {
-	for _, tst := range testcases {
-		// assert unicode.com == punycode.com
-		full := ToPunycode(tst[0] + ".com")
-		if full != tst[1]+".com" {
-			t.Errorf("invalid result from string conversion to punycode, %s and should be %s.com", full, tst[1])
-		}
-		// assert punycode.punycode == unicode.unicode
-		decoded := FromPunycode(tst[1] + "." + tst[1])
-		if decoded != strings.ToLower(tst[0]+"."+tst[0]) {
-			t.Errorf("invalid result from string conversion to punycode, %s and should be %s.%s", decoded, tst[0], tst[0])
-		}
-	}
-}
-
-func TestEncodeDecodeFinalPeriod(t *testing.T) {
-	for _, tst := range testcases {
-		// assert unicode.com. == punycode.com.
-		full := ToPunycode(tst[0] + ".")
-		if full != tst[1]+"." {
-			t.Errorf("invalid result from string conversion to punycode when period added at the end, %#v and should be %#v", full, tst[1]+".")
-		}
-		// assert punycode.com. == unicode.com.
-		decoded := FromPunycode(tst[1] + ".")
-		if decoded != strings.ToLower(tst[0]+".") {
-			t.Errorf("invalid result from string conversion to punycode when period added, %#v and should be %#v", decoded, tst[0]+".")
-		}
-		full = ToPunycode(tst[0])
-		if full != tst[1] {
-			t.Errorf("invalid result from string conversion to punycode when no period added at the end, %#v and should be %#v", full, tst[1]+".")
-		}
-		// assert punycode.com. == unicode.com.
-		decoded = FromPunycode(tst[1])
-		if decoded != strings.ToLower(tst[0]) {
-			t.Errorf("invalid result from string conversion to punycode when no period added, %#v and should be %#v", decoded, tst[0]+".")
-		}
-	}
-}
-
-var invalidACEs = []string{
-	"xn--*",
-	"xn--",
-	"xn---",
-	"xn--a000000000",
-}
-
-func TestInvalidPunycode(t *testing.T) {
-	for _, d := range invalidACEs {
-		s := FromPunycode(d)
-		if s != d {
-			t.Errorf("Changed invalid name %s to %#v", d, s)
-		}
-	}
-}
-
-// You can verify the labels that are valid or not comparing to the Verisign
-// website: http://mct.verisign-grs.com/
-var invalidUnicodes = []string{
-	"Σ",
-	"ЯZ",
-	"Испытание",
-}
-
-func TestInvalidUnicodes(t *testing.T) {
-	for _, d := range invalidUnicodes {
-		s := ToPunycode(d)
-		if s != "" {
-			t.Errorf("Changed invalid name %s to %#v", d, s)
-		}
-	}
-}

+ 0 - 23
vendor/github.com/miekg/dns/issue_test.go

@@ -1,23 +0,0 @@
-package dns
-
-// Tests that solve that an specific issue.
-
-import "testing"
-
-func TestTCPRtt(t *testing.T) {
-	m := new(Msg)
-	m.RecursionDesired = true
-	m.SetQuestion("example.org.", TypeA)
-
-	c := &Client{}
-	for _, proto := range []string{"udp", "tcp"} {
-		c.Net = proto
-		_, rtt, err := c.Exchange(m, "8.8.4.4:53")
-		if err != nil {
-			t.Fatal(err)
-		}
-		if rtt == 0 {
-			t.Fatalf("expecting non zero rtt %s, got zero", c.Net)
-		}
-	}
-}

+ 1 - 1
vendor/github.com/miekg/dns/labels.go

@@ -107,7 +107,7 @@ func CountLabel(s string) (labels int) {
 
 
 // Split splits a name s into its label indexes.
 // Split splits a name s into its label indexes.
 // www.miek.nl. returns []int{0, 4, 9}, www.miek.nl also returns []int{0, 4, 9}.
 // www.miek.nl. returns []int{0, 4, 9}, www.miek.nl also returns []int{0, 4, 9}.
-// The root name (.) returns nil. Also see SplitDomainName. 
+// The root name (.) returns nil. Also see SplitDomainName.
 // s must be a syntactically valid domain name.
 // s must be a syntactically valid domain name.
 func Split(s string) []int {
 func Split(s string) []int {
 	if s == "." {
 	if s == "." {

+ 0 - 198
vendor/github.com/miekg/dns/labels_test.go

@@ -1,198 +0,0 @@
-package dns
-
-import "testing"
-
-func TestCompareDomainName(t *testing.T) {
-	s1 := "www.miek.nl."
-	s2 := "miek.nl."
-	s3 := "www.bla.nl."
-	s4 := "nl.www.bla."
-	s5 := "nl"
-	s6 := "miek.nl"
-
-	if CompareDomainName(s1, s2) != 2 {
-		t.Errorf("%s with %s should be %d", s1, s2, 2)
-	}
-	if CompareDomainName(s1, s3) != 1 {
-		t.Errorf("%s with %s should be %d", s1, s3, 1)
-	}
-	if CompareDomainName(s3, s4) != 0 {
-		t.Errorf("%s with %s should be %d", s3, s4, 0)
-	}
-	// Non qualified tests
-	if CompareDomainName(s1, s5) != 1 {
-		t.Errorf("%s with %s should be %d", s1, s5, 1)
-	}
-	if CompareDomainName(s1, s6) != 2 {
-		t.Errorf("%s with %s should be %d", s1, s5, 2)
-	}
-
-	if CompareDomainName(s1, ".") != 0 {
-		t.Errorf("%s with %s should be %d", s1, s5, 0)
-	}
-	if CompareDomainName(".", ".") != 0 {
-		t.Errorf("%s with %s should be %d", ".", ".", 0)
-	}
-}
-
-func TestSplit(t *testing.T) {
-	splitter := map[string]int{
-		"www.miek.nl.":   3,
-		"www.miek.nl":    3,
-		"www..miek.nl":   4,
-		`www\.miek.nl.`:  2,
-		`www\\.miek.nl.`: 3,
-		".":              0,
-		"nl.":            1,
-		"nl":             1,
-		"com.":           1,
-		".com.":          2,
-	}
-	for s, i := range splitter {
-		if x := len(Split(s)); x != i {
-			t.Errorf("labels should be %d, got %d: %s %v", i, x, s, Split(s))
-		} else {
-			t.Logf("%s %v", s, Split(s))
-		}
-	}
-}
-
-func TestSplit2(t *testing.T) {
-	splitter := map[string][]int{
-		"www.miek.nl.": {0, 4, 9},
-		"www.miek.nl":  {0, 4, 9},
-		"nl":           {0},
-	}
-	for s, i := range splitter {
-		x := Split(s)
-		switch len(i) {
-		case 1:
-			if x[0] != i[0] {
-				t.Errorf("labels should be %v, got %v: %s", i, x, s)
-			}
-		default:
-			if x[0] != i[0] || x[1] != i[1] || x[2] != i[2] {
-				t.Errorf("labels should be %v, got %v: %s", i, x, s)
-			}
-		}
-	}
-}
-
-func TestPrevLabel(t *testing.T) {
-	type prev struct {
-		string
-		int
-	}
-	prever := map[prev]int{
-		prev{"www.miek.nl.", 0}: 12,
-		prev{"www.miek.nl.", 1}: 9,
-		prev{"www.miek.nl.", 2}: 4,
-
-		prev{"www.miek.nl", 0}: 11,
-		prev{"www.miek.nl", 1}: 9,
-		prev{"www.miek.nl", 2}: 4,
-
-		prev{"www.miek.nl.", 5}: 0,
-		prev{"www.miek.nl", 5}:  0,
-
-		prev{"www.miek.nl.", 3}: 0,
-		prev{"www.miek.nl", 3}:  0,
-	}
-	for s, i := range prever {
-		x, ok := PrevLabel(s.string, s.int)
-		if i != x {
-			t.Errorf("label should be %d, got %d, %t: preving %d, %s", i, x, ok, s.int, s.string)
-		}
-	}
-}
-
-func TestCountLabel(t *testing.T) {
-	splitter := map[string]int{
-		"www.miek.nl.": 3,
-		"www.miek.nl":  3,
-		"nl":           1,
-		".":            0,
-	}
-	for s, i := range splitter {
-		x := CountLabel(s)
-		if x != i {
-			t.Errorf("CountLabel should have %d, got %d", i, x)
-		}
-	}
-}
-
-func TestSplitDomainName(t *testing.T) {
-	labels := map[string][]string{
-		"miek.nl":       {"miek", "nl"},
-		".":             nil,
-		"www.miek.nl.":  {"www", "miek", "nl"},
-		"www.miek.nl":   {"www", "miek", "nl"},
-		"www..miek.nl":  {"www", "", "miek", "nl"},
-		`www\.miek.nl`:  {`www\.miek`, "nl"},
-		`www\\.miek.nl`: {`www\\`, "miek", "nl"},
-		".www.miek.nl.": {"", "www", "miek", "nl"},
-	}
-domainLoop:
-	for domain, splits := range labels {
-		parts := SplitDomainName(domain)
-		if len(parts) != len(splits) {
-			t.Errorf("SplitDomainName returned %v for %s, expected %v", parts, domain, splits)
-			continue domainLoop
-		}
-		for i := range parts {
-			if parts[i] != splits[i] {
-				t.Errorf("SplitDomainName returned %v for %s, expected %v", parts, domain, splits)
-				continue domainLoop
-			}
-		}
-	}
-}
-
-func TestIsDomainName(t *testing.T) {
-	type ret struct {
-		ok  bool
-		lab int
-	}
-	names := map[string]*ret{
-		"..":               {false, 1},
-		"@.":               {true, 1},
-		"www.example.com":  {true, 3},
-		"www.e%ample.com":  {true, 3},
-		"www.example.com.": {true, 3},
-		"mi\\k.nl.":        {true, 2},
-		"mi\\k.nl":         {true, 2},
-	}
-	for d, ok := range names {
-		l, k := IsDomainName(d)
-		if ok.ok != k || ok.lab != l {
-			t.Errorf(" got %v %d for %s ", k, l, d)
-			t.Errorf("have %v %d for %s ", ok.ok, ok.lab, d)
-		}
-	}
-}
-
-func BenchmarkSplitLabels(b *testing.B) {
-	for i := 0; i < b.N; i++ {
-		Split("www.example.com")
-	}
-}
-
-func BenchmarkLenLabels(b *testing.B) {
-	for i := 0; i < b.N; i++ {
-		CountLabel("www.example.com")
-	}
-}
-
-func BenchmarkCompareLabels(b *testing.B) {
-	for i := 0; i < b.N; i++ {
-		CompareDomainName("www.example.com", "aa.example.com")
-	}
-}
-
-func BenchmarkIsSubDomain(b *testing.B) {
-	for i := 0; i < b.N; i++ {
-		IsSubDomain("www.example.com", "aa.example.com")
-		IsSubDomain("example.com", "aa.example.com")
-		IsSubDomain("miek.nl", "aa.example.com")
-	}
-}

File diff suppressed because it is too large
+ 62 - 837
vendor/github.com/miekg/dns/msg.go


+ 340 - 0
vendor/github.com/miekg/dns/msg_generate.go

@@ -0,0 +1,340 @@
+//+build ignore
+
+// msg_generate.go is meant to run with go generate. It will use
+// go/{importer,types} to track down all the RR struct types. Then for each type
+// it will generate pack/unpack methods based on the struct tags. The generated source is
+// written to zmsg.go, and is meant to be checked into git.
+package main
+
+import (
+	"bytes"
+	"fmt"
+	"go/format"
+	"go/importer"
+	"go/types"
+	"log"
+	"os"
+	"strings"
+)
+
+var packageHdr = `
+// *** DO NOT MODIFY ***
+// AUTOGENERATED BY go generate from msg_generate.go
+
+package dns
+
+`
+
+// getTypeStruct will take a type and the package scope, and return the
+// (innermost) struct if the type is considered a RR type (currently defined as
+// those structs beginning with a RR_Header, could be redefined as implementing
+// the RR interface). The bool return value indicates if embedded structs were
+// resolved.
+func getTypeStruct(t types.Type, scope *types.Scope) (*types.Struct, bool) {
+	st, ok := t.Underlying().(*types.Struct)
+	if !ok {
+		return nil, false
+	}
+	if st.Field(0).Type() == scope.Lookup("RR_Header").Type() {
+		return st, false
+	}
+	if st.Field(0).Anonymous() {
+		st, _ := getTypeStruct(st.Field(0).Type(), scope)
+		return st, true
+	}
+	return nil, false
+}
+
+func main() {
+	// Import and type-check the package
+	pkg, err := importer.Default().Import("github.com/miekg/dns")
+	fatalIfErr(err)
+	scope := pkg.Scope()
+
+	// Collect actual types (*X)
+	var namedTypes []string
+	for _, name := range scope.Names() {
+		o := scope.Lookup(name)
+		if o == nil || !o.Exported() {
+			continue
+		}
+		if st, _ := getTypeStruct(o.Type(), scope); st == nil {
+			continue
+		}
+		if name == "PrivateRR" {
+			continue
+		}
+
+		// Check if corresponding TypeX exists
+		if scope.Lookup("Type"+o.Name()) == nil && o.Name() != "RFC3597" {
+			log.Fatalf("Constant Type%s does not exist.", o.Name())
+		}
+
+		namedTypes = append(namedTypes, o.Name())
+	}
+
+	b := &bytes.Buffer{}
+	b.WriteString(packageHdr)
+
+	fmt.Fprint(b, "// pack*() functions\n\n")
+	for _, name := range namedTypes {
+		o := scope.Lookup(name)
+		st, _ := getTypeStruct(o.Type(), scope)
+
+		fmt.Fprintf(b, "func (rr *%s) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {\n", name)
+		fmt.Fprint(b, `off, err := rr.Hdr.pack(msg, off, compression, compress)
+if err != nil {
+	return off, err
+}
+headerEnd := off
+`)
+		for i := 1; i < st.NumFields(); i++ {
+			o := func(s string) {
+				fmt.Fprintf(b, s, st.Field(i).Name())
+				fmt.Fprint(b, `if err != nil {
+return off, err
+}
+`)
+			}
+
+			if _, ok := st.Field(i).Type().(*types.Slice); ok {
+				switch st.Tag(i) {
+				case `dns:"-"`: // ignored
+				case `dns:"txt"`:
+					o("off, err = packStringTxt(rr.%s, msg, off)\n")
+				case `dns:"opt"`:
+					o("off, err = packDataOpt(rr.%s, msg, off)\n")
+				case `dns:"nsec"`:
+					o("off, err = packDataNsec(rr.%s, msg, off)\n")
+				case `dns:"domain-name"`:
+					o("off, err = packDataDomainNames(rr.%s, msg, off, compression, compress)\n")
+				default:
+					log.Fatalln(name, st.Field(i).Name(), st.Tag(i))
+				}
+				continue
+			}
+
+			switch {
+			case st.Tag(i) == `dns:"-"`: // ignored
+			case st.Tag(i) == `dns:"cdomain-name"`:
+				fallthrough
+			case st.Tag(i) == `dns:"domain-name"`:
+				o("off, err = PackDomainName(rr.%s, msg, off, compression, compress)\n")
+			case st.Tag(i) == `dns:"a"`:
+				o("off, err = packDataA(rr.%s, msg, off)\n")
+			case st.Tag(i) == `dns:"aaaa"`:
+				o("off, err = packDataAAAA(rr.%s, msg, off)\n")
+			case st.Tag(i) == `dns:"uint48"`:
+				o("off, err = packUint48(rr.%s, msg, off)\n")
+			case st.Tag(i) == `dns:"txt"`:
+				o("off, err = packString(rr.%s, msg, off)\n")
+
+			case strings.HasPrefix(st.Tag(i), `dns:"size-base32`): // size-base32 can be packed just like base32
+				fallthrough
+			case st.Tag(i) == `dns:"base32"`:
+				o("off, err = packStringBase32(rr.%s, msg, off)\n")
+
+			case strings.HasPrefix(st.Tag(i), `dns:"size-base64`): // size-base64 can be packed just like base64
+				fallthrough
+			case st.Tag(i) == `dns:"base64"`:
+				o("off, err = packStringBase64(rr.%s, msg, off)\n")
+
+			case strings.HasPrefix(st.Tag(i), `dns:"size-hex:SaltLength`): // Hack to fix empty salt length for NSEC3
+				o("if rr.%s == \"-\" { /* do nothing, empty salt */ }\n")
+				continue
+			case strings.HasPrefix(st.Tag(i), `dns:"size-hex`): // size-hex can be packed just like hex
+				fallthrough
+			case st.Tag(i) == `dns:"hex"`:
+				o("off, err = packStringHex(rr.%s, msg, off)\n")
+
+			case st.Tag(i) == `dns:"octet"`:
+				o("off, err = packStringOctet(rr.%s, msg, off)\n")
+			case st.Tag(i) == "":
+				switch st.Field(i).Type().(*types.Basic).Kind() {
+				case types.Uint8:
+					o("off, err = packUint8(rr.%s, msg, off)\n")
+				case types.Uint16:
+					o("off, err = packUint16(rr.%s, msg, off)\n")
+				case types.Uint32:
+					o("off, err = packUint32(rr.%s, msg, off)\n")
+				case types.Uint64:
+					o("off, err = packUint64(rr.%s, msg, off)\n")
+				case types.String:
+					o("off, err = packString(rr.%s, msg, off)\n")
+				default:
+					log.Fatalln(name, st.Field(i).Name())
+				}
+			default:
+				log.Fatalln(name, st.Field(i).Name(), st.Tag(i))
+			}
+		}
+		// We have packed everything, only now we know the rdlength of this RR
+		fmt.Fprintln(b, "rr.Header().Rdlength = uint16(off-headerEnd)")
+		fmt.Fprintln(b, "return off, nil }\n")
+	}
+
+	fmt.Fprint(b, "// unpack*() functions\n\n")
+	for _, name := range namedTypes {
+		o := scope.Lookup(name)
+		st, _ := getTypeStruct(o.Type(), scope)
+
+		fmt.Fprintf(b, "func unpack%s(h RR_Header, msg []byte, off int) (RR, int, error) {\n", name)
+		fmt.Fprintf(b, "rr := new(%s)\n", name)
+		fmt.Fprint(b, "rr.Hdr = h\n")
+		fmt.Fprint(b, `if noRdata(h) {
+return rr, off, nil
+	}
+var err error
+rdStart := off
+_ = rdStart
+
+`)
+		for i := 1; i < st.NumFields(); i++ {
+			o := func(s string) {
+				fmt.Fprintf(b, s, st.Field(i).Name())
+				fmt.Fprint(b, `if err != nil {
+return rr, off, err
+}
+`)
+			}
+
+			// size-* are special, because they reference a struct member we should use for the length.
+			if strings.HasPrefix(st.Tag(i), `dns:"size-`) {
+				structMember := structMember(st.Tag(i))
+				structTag := structTag(st.Tag(i))
+				switch structTag {
+				case "hex":
+					fmt.Fprintf(b, "rr.%s, off, err = unpackStringHex(msg, off, off + int(rr.%s))\n", st.Field(i).Name(), structMember)
+				case "base32":
+					fmt.Fprintf(b, "rr.%s, off, err = unpackStringBase32(msg, off, off + int(rr.%s))\n", st.Field(i).Name(), structMember)
+				case "base64":
+					fmt.Fprintf(b, "rr.%s, off, err = unpackStringBase64(msg, off, off + int(rr.%s))\n", st.Field(i).Name(), structMember)
+				default:
+					log.Fatalln(name, st.Field(i).Name(), st.Tag(i))
+				}
+				fmt.Fprint(b, `if err != nil {
+return rr, off, err
+}
+`)
+				continue
+			}
+
+			if _, ok := st.Field(i).Type().(*types.Slice); ok {
+				switch st.Tag(i) {
+				case `dns:"-"`: // ignored
+				case `dns:"txt"`:
+					o("rr.%s, off, err = unpackStringTxt(msg, off)\n")
+				case `dns:"opt"`:
+					o("rr.%s, off, err = unpackDataOpt(msg, off)\n")
+				case `dns:"nsec"`:
+					o("rr.%s, off, err = unpackDataNsec(msg, off)\n")
+				case `dns:"domain-name"`:
+					o("rr.%s, off, err = unpackDataDomainNames(msg, off, rdStart + int(rr.Hdr.Rdlength))\n")
+				default:
+					log.Fatalln(name, st.Field(i).Name(), st.Tag(i))
+				}
+				continue
+			}
+
+			switch st.Tag(i) {
+			case `dns:"-"`: // ignored
+			case `dns:"cdomain-name"`:
+				fallthrough
+			case `dns:"domain-name"`:
+				o("rr.%s, off, err = UnpackDomainName(msg, off)\n")
+			case `dns:"a"`:
+				o("rr.%s, off, err = unpackDataA(msg, off)\n")
+			case `dns:"aaaa"`:
+				o("rr.%s, off, err = unpackDataAAAA(msg, off)\n")
+			case `dns:"uint48"`:
+				o("rr.%s, off, err = unpackUint48(msg, off)\n")
+			case `dns:"txt"`:
+				o("rr.%s, off, err = unpackString(msg, off)\n")
+			case `dns:"base32"`:
+				o("rr.%s, off, err = unpackStringBase32(msg, off, rdStart + int(rr.Hdr.Rdlength))\n")
+			case `dns:"base64"`:
+				o("rr.%s, off, err = unpackStringBase64(msg, off, rdStart + int(rr.Hdr.Rdlength))\n")
+			case `dns:"hex"`:
+				o("rr.%s, off, err = unpackStringHex(msg, off, rdStart + int(rr.Hdr.Rdlength))\n")
+			case `dns:"octet"`:
+				o("rr.%s, off, err = unpackStringOctet(msg, off)\n")
+			case "":
+				switch st.Field(i).Type().(*types.Basic).Kind() {
+				case types.Uint8:
+					o("rr.%s, off, err = unpackUint8(msg, off)\n")
+				case types.Uint16:
+					o("rr.%s, off, err = unpackUint16(msg, off)\n")
+				case types.Uint32:
+					o("rr.%s, off, err = unpackUint32(msg, off)\n")
+				case types.Uint64:
+					o("rr.%s, off, err = unpackUint64(msg, off)\n")
+				case types.String:
+					o("rr.%s, off, err = unpackString(msg, off)\n")
+				default:
+					log.Fatalln(name, st.Field(i).Name())
+				}
+			default:
+				log.Fatalln(name, st.Field(i).Name(), st.Tag(i))
+			}
+			// If we've hit len(msg) we return without error.
+			if i < st.NumFields()-1 {
+				fmt.Fprintf(b, `if off == len(msg) {
+return rr, off, nil
+	}
+`)
+			}
+		}
+		fmt.Fprintf(b, "return rr, off, err }\n\n")
+	}
+	// Generate typeToUnpack map
+	fmt.Fprintln(b, "var typeToUnpack = map[uint16]func(RR_Header, []byte, int) (RR, int, error){")
+	for _, name := range namedTypes {
+		if name == "RFC3597" {
+			continue
+		}
+		fmt.Fprintf(b, "Type%s: unpack%s,\n", name, name)
+	}
+	fmt.Fprintln(b, "}\n")
+
+	// gofmt
+	res, err := format.Source(b.Bytes())
+	if err != nil {
+		b.WriteTo(os.Stderr)
+		log.Fatal(err)
+	}
+
+	// write result
+	f, err := os.Create("zmsg.go")
+	fatalIfErr(err)
+	defer f.Close()
+	f.Write(res)
+}
+
+// structMember will take a tag like dns:"size-base32:SaltLength" and return the last part of this string.
+func structMember(s string) string {
+	fields := strings.Split(s, ":")
+	if len(fields) == 0 {
+		return ""
+	}
+	f := fields[len(fields)-1]
+	// f should have a closing "
+	if len(f) > 1 {
+		return f[:len(f)-1]
+	}
+	return f
+}
+
+// structTag will take a tag like dns:"size-base32:SaltLength" and return base32.
+func structTag(s string) string {
+	fields := strings.Split(s, ":")
+	if len(fields) < 2 {
+		return ""
+	}
+	return fields[1][len("\"size-"):]
+}
+
+func fatalIfErr(err error) {
+	if err != nil {
+		log.Fatal(err)
+	}
+}

+ 630 - 0
vendor/github.com/miekg/dns/msg_helpers.go

@@ -0,0 +1,630 @@
+package dns
+
+import (
+	"encoding/base32"
+	"encoding/base64"
+	"encoding/binary"
+	"encoding/hex"
+	"net"
+	"strconv"
+)
+
+// helper functions called from the generated zmsg.go
+
+// These function are named after the tag to help pack/unpack, if there is no tag it is the name
+// of the type they pack/unpack (string, int, etc). We prefix all with unpackData or packData, so packDataA or
+// packDataDomainName.
+
+func unpackDataA(msg []byte, off int) (net.IP, int, error) {
+	if off+net.IPv4len > len(msg) {
+		return nil, len(msg), &Error{err: "overflow unpacking a"}
+	}
+	a := append(make(net.IP, 0, net.IPv4len), msg[off:off+net.IPv4len]...)
+	off += net.IPv4len
+	return a, off, nil
+}
+
+func packDataA(a net.IP, msg []byte, off int) (int, error) {
+	// It must be a slice of 4, even if it is 16, we encode only the first 4
+	if off+net.IPv4len > len(msg) {
+		return len(msg), &Error{err: "overflow packing a"}
+	}
+	switch len(a) {
+	case net.IPv4len, net.IPv6len:
+		copy(msg[off:], a.To4())
+		off += net.IPv4len
+	case 0:
+		// Allowed, for dynamic updates.
+	default:
+		return len(msg), &Error{err: "overflow packing a"}
+	}
+	return off, nil
+}
+
+func unpackDataAAAA(msg []byte, off int) (net.IP, int, error) {
+	if off+net.IPv6len > len(msg) {
+		return nil, len(msg), &Error{err: "overflow unpacking aaaa"}
+	}
+	aaaa := append(make(net.IP, 0, net.IPv6len), msg[off:off+net.IPv6len]...)
+	off += net.IPv6len
+	return aaaa, off, nil
+}
+
+func packDataAAAA(aaaa net.IP, msg []byte, off int) (int, error) {
+	if off+net.IPv6len > len(msg) {
+		return len(msg), &Error{err: "overflow packing aaaa"}
+	}
+
+	switch len(aaaa) {
+	case net.IPv6len:
+		copy(msg[off:], aaaa)
+		off += net.IPv6len
+	case 0:
+		// Allowed, dynamic updates.
+	default:
+		return len(msg), &Error{err: "overflow packing aaaa"}
+	}
+	return off, nil
+}
+
+// unpackHeader unpacks an RR header, returning the offset to the end of the header and a
+// re-sliced msg according to the expected length of the RR.
+func unpackHeader(msg []byte, off int) (rr RR_Header, off1 int, truncmsg []byte, err error) {
+	hdr := RR_Header{}
+	if off == len(msg) {
+		return hdr, off, msg, nil
+	}
+
+	hdr.Name, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return hdr, len(msg), msg, err
+	}
+	hdr.Rrtype, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return hdr, len(msg), msg, err
+	}
+	hdr.Class, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return hdr, len(msg), msg, err
+	}
+	hdr.Ttl, off, err = unpackUint32(msg, off)
+	if err != nil {
+		return hdr, len(msg), msg, err
+	}
+	hdr.Rdlength, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return hdr, len(msg), msg, err
+	}
+	msg, err = truncateMsgFromRdlength(msg, off, hdr.Rdlength)
+	return hdr, off, msg, nil
+}
+
+// pack packs an RR header, returning the offset to the end of the header.
+// See PackDomainName for documentation about the compression.
+func (hdr RR_Header) pack(msg []byte, off int, compression map[string]int, compress bool) (off1 int, err error) {
+	if off == len(msg) {
+		return off, nil
+	}
+
+	off, err = PackDomainName(hdr.Name, msg, off, compression, compress)
+	if err != nil {
+		return len(msg), err
+	}
+	off, err = packUint16(hdr.Rrtype, msg, off)
+	if err != nil {
+		return len(msg), err
+	}
+	off, err = packUint16(hdr.Class, msg, off)
+	if err != nil {
+		return len(msg), err
+	}
+	off, err = packUint32(hdr.Ttl, msg, off)
+	if err != nil {
+		return len(msg), err
+	}
+	off, err = packUint16(hdr.Rdlength, msg, off)
+	if err != nil {
+		return len(msg), err
+	}
+	return off, nil
+}
+
+// helper helper functions.
+
+// truncateMsgFromRdLength truncates msg to match the expected length of the RR.
+// Returns an error if msg is smaller than the expected size.
+func truncateMsgFromRdlength(msg []byte, off int, rdlength uint16) (truncmsg []byte, err error) {
+	lenrd := off + int(rdlength)
+	if lenrd > len(msg) {
+		return msg, &Error{err: "overflowing header size"}
+	}
+	return msg[:lenrd], nil
+}
+
+func fromBase32(s []byte) (buf []byte, err error) {
+	buflen := base32.HexEncoding.DecodedLen(len(s))
+	buf = make([]byte, buflen)
+	n, err := base32.HexEncoding.Decode(buf, s)
+	buf = buf[:n]
+	return
+}
+
+func toBase32(b []byte) string { return base32.HexEncoding.EncodeToString(b) }
+
+func fromBase64(s []byte) (buf []byte, err error) {
+	buflen := base64.StdEncoding.DecodedLen(len(s))
+	buf = make([]byte, buflen)
+	n, err := base64.StdEncoding.Decode(buf, s)
+	buf = buf[:n]
+	return
+}
+
+func toBase64(b []byte) string { return base64.StdEncoding.EncodeToString(b) }
+
+// dynamicUpdate returns true if the Rdlength is zero.
+func noRdata(h RR_Header) bool { return h.Rdlength == 0 }
+
+func unpackUint8(msg []byte, off int) (i uint8, off1 int, err error) {
+	if off+1 > len(msg) {
+		return 0, len(msg), &Error{err: "overflow unpacking uint8"}
+	}
+	return uint8(msg[off]), off + 1, nil
+}
+
+func packUint8(i uint8, msg []byte, off int) (off1 int, err error) {
+	if off+1 > len(msg) {
+		return len(msg), &Error{err: "overflow packing uint8"}
+	}
+	msg[off] = byte(i)
+	return off + 1, nil
+}
+
+func unpackUint16(msg []byte, off int) (i uint16, off1 int, err error) {
+	if off+2 > len(msg) {
+		return 0, len(msg), &Error{err: "overflow unpacking uint16"}
+	}
+	return binary.BigEndian.Uint16(msg[off:]), off + 2, nil
+}
+
+func packUint16(i uint16, msg []byte, off int) (off1 int, err error) {
+	if off+2 > len(msg) {
+		return len(msg), &Error{err: "overflow packing uint16"}
+	}
+	binary.BigEndian.PutUint16(msg[off:], i)
+	return off + 2, nil
+}
+
+func unpackUint32(msg []byte, off int) (i uint32, off1 int, err error) {
+	if off+4 > len(msg) {
+		return 0, len(msg), &Error{err: "overflow unpacking uint32"}
+	}
+	return binary.BigEndian.Uint32(msg[off:]), off + 4, nil
+}
+
+func packUint32(i uint32, msg []byte, off int) (off1 int, err error) {
+	if off+4 > len(msg) {
+		return len(msg), &Error{err: "overflow packing uint32"}
+	}
+	binary.BigEndian.PutUint32(msg[off:], i)
+	return off + 4, nil
+}
+
+func unpackUint48(msg []byte, off int) (i uint64, off1 int, err error) {
+	if off+6 > len(msg) {
+		return 0, len(msg), &Error{err: "overflow unpacking uint64 as uint48"}
+	}
+	// Used in TSIG where the last 48 bits are occupied, so for now, assume a uint48 (6 bytes)
+	i = (uint64(uint64(msg[off])<<40 | uint64(msg[off+1])<<32 | uint64(msg[off+2])<<24 | uint64(msg[off+3])<<16 |
+		uint64(msg[off+4])<<8 | uint64(msg[off+5])))
+	off += 6
+	return i, off, nil
+}
+
+func packUint48(i uint64, msg []byte, off int) (off1 int, err error) {
+	if off+6 > len(msg) {
+		return len(msg), &Error{err: "overflow packing uint64 as uint48"}
+	}
+	msg[off] = byte(i >> 40)
+	msg[off+1] = byte(i >> 32)
+	msg[off+2] = byte(i >> 24)
+	msg[off+3] = byte(i >> 16)
+	msg[off+4] = byte(i >> 8)
+	msg[off+5] = byte(i)
+	off += 6
+	return off, nil
+}
+
+func unpackUint64(msg []byte, off int) (i uint64, off1 int, err error) {
+	if off+8 > len(msg) {
+		return 0, len(msg), &Error{err: "overflow unpacking uint64"}
+	}
+	return binary.BigEndian.Uint64(msg[off:]), off + 8, nil
+}
+
+func packUint64(i uint64, msg []byte, off int) (off1 int, err error) {
+	if off+8 > len(msg) {
+		return len(msg), &Error{err: "overflow packing uint64"}
+	}
+	binary.BigEndian.PutUint64(msg[off:], i)
+	off += 8
+	return off, nil
+}
+
+func unpackString(msg []byte, off int) (string, int, error) {
+	if off+1 > len(msg) {
+		return "", off, &Error{err: "overflow unpacking txt"}
+	}
+	l := int(msg[off])
+	if off+l+1 > len(msg) {
+		return "", off, &Error{err: "overflow unpacking txt"}
+	}
+	s := make([]byte, 0, l)
+	for _, b := range msg[off+1 : off+1+l] {
+		switch b {
+		case '"', '\\':
+			s = append(s, '\\', b)
+		case '\t', '\r', '\n':
+			s = append(s, b)
+		default:
+			if b < 32 || b > 127 { // unprintable
+				var buf [3]byte
+				bufs := strconv.AppendInt(buf[:0], int64(b), 10)
+				s = append(s, '\\')
+				for i := 0; i < 3-len(bufs); i++ {
+					s = append(s, '0')
+				}
+				for _, r := range bufs {
+					s = append(s, r)
+				}
+			} else {
+				s = append(s, b)
+			}
+		}
+	}
+	off += 1 + l
+	return string(s), off, nil
+}
+
+func packString(s string, msg []byte, off int) (int, error) {
+	txtTmp := make([]byte, 256*4+1)
+	off, err := packTxtString(s, msg, off, txtTmp)
+	if err != nil {
+		return len(msg), err
+	}
+	return off, nil
+}
+
+func unpackStringBase32(msg []byte, off, end int) (string, int, error) {
+	if end > len(msg) {
+		return "", len(msg), &Error{err: "overflow unpacking base32"}
+	}
+	s := toBase32(msg[off:end])
+	return s, end, nil
+}
+
+func packStringBase32(s string, msg []byte, off int) (int, error) {
+	b32, err := fromBase32([]byte(s))
+	if err != nil {
+		return len(msg), err
+	}
+	if off+len(b32) > len(msg) {
+		return len(msg), &Error{err: "overflow packing base32"}
+	}
+	copy(msg[off:off+len(b32)], b32)
+	off += len(b32)
+	return off, nil
+}
+
+func unpackStringBase64(msg []byte, off, end int) (string, int, error) {
+	// Rest of the RR is base64 encoded value, so we don't need an explicit length
+	// to be set. Thus far all RR's that have base64 encoded fields have those as their
+	// last one. What we do need is the end of the RR!
+	if end > len(msg) {
+		return "", len(msg), &Error{err: "overflow unpacking base64"}
+	}
+	s := toBase64(msg[off:end])
+	return s, end, nil
+}
+
+func packStringBase64(s string, msg []byte, off int) (int, error) {
+	b64, err := fromBase64([]byte(s))
+	if err != nil {
+		return len(msg), err
+	}
+	if off+len(b64) > len(msg) {
+		return len(msg), &Error{err: "overflow packing base64"}
+	}
+	copy(msg[off:off+len(b64)], b64)
+	off += len(b64)
+	return off, nil
+}
+
+func unpackStringHex(msg []byte, off, end int) (string, int, error) {
+	// Rest of the RR is hex encoded value, so we don't need an explicit length
+	// to be set. NSEC and TSIG have hex fields with a length field.
+	// What we do need is the end of the RR!
+	if end > len(msg) {
+		return "", len(msg), &Error{err: "overflow unpacking hex"}
+	}
+
+	s := hex.EncodeToString(msg[off:end])
+	return s, end, nil
+}
+
+func packStringHex(s string, msg []byte, off int) (int, error) {
+	h, err := hex.DecodeString(s)
+	if err != nil {
+		return len(msg), err
+	}
+	if off+(len(h)) > len(msg) {
+		return len(msg), &Error{err: "overflow packing hex"}
+	}
+	copy(msg[off:off+len(h)], h)
+	off += len(h)
+	return off, nil
+}
+
+func unpackStringTxt(msg []byte, off int) ([]string, int, error) {
+	txt, off, err := unpackTxt(msg, off)
+	if err != nil {
+		return nil, len(msg), err
+	}
+	return txt, off, nil
+}
+
+func packStringTxt(s []string, msg []byte, off int) (int, error) {
+	txtTmp := make([]byte, 256*4+1) // If the whole string consists out of \DDD we need this many.
+	off, err := packTxt(s, msg, off, txtTmp)
+	if err != nil {
+		return len(msg), err
+	}
+	return off, nil
+}
+
+func unpackDataOpt(msg []byte, off int) ([]EDNS0, int, error) {
+	var edns []EDNS0
+Option:
+	code := uint16(0)
+	if off+4 > len(msg) {
+		return nil, len(msg), &Error{err: "overflow unpacking opt"}
+	}
+	code = binary.BigEndian.Uint16(msg[off:])
+	off += 2
+	optlen := binary.BigEndian.Uint16(msg[off:])
+	off += 2
+	if off+int(optlen) > len(msg) {
+		return nil, len(msg), &Error{err: "overflow unpacking opt"}
+	}
+	switch code {
+	case EDNS0NSID:
+		e := new(EDNS0_NSID)
+		if err := e.unpack(msg[off : off+int(optlen)]); err != nil {
+			return nil, len(msg), err
+		}
+		edns = append(edns, e)
+		off += int(optlen)
+	case EDNS0SUBNET, EDNS0SUBNETDRAFT:
+		e := new(EDNS0_SUBNET)
+		if err := e.unpack(msg[off : off+int(optlen)]); err != nil {
+			return nil, len(msg), err
+		}
+		edns = append(edns, e)
+		off += int(optlen)
+		if code == EDNS0SUBNETDRAFT {
+			e.DraftOption = true
+		}
+	case EDNS0COOKIE:
+		e := new(EDNS0_COOKIE)
+		if err := e.unpack(msg[off : off+int(optlen)]); err != nil {
+			return nil, len(msg), err
+		}
+		edns = append(edns, e)
+		off += int(optlen)
+	case EDNS0UL:
+		e := new(EDNS0_UL)
+		if err := e.unpack(msg[off : off+int(optlen)]); err != nil {
+			return nil, len(msg), err
+		}
+		edns = append(edns, e)
+		off += int(optlen)
+	case EDNS0LLQ:
+		e := new(EDNS0_LLQ)
+		if err := e.unpack(msg[off : off+int(optlen)]); err != nil {
+			return nil, len(msg), err
+		}
+		edns = append(edns, e)
+		off += int(optlen)
+	case EDNS0DAU:
+		e := new(EDNS0_DAU)
+		if err := e.unpack(msg[off : off+int(optlen)]); err != nil {
+			return nil, len(msg), err
+		}
+		edns = append(edns, e)
+		off += int(optlen)
+	case EDNS0DHU:
+		e := new(EDNS0_DHU)
+		if err := e.unpack(msg[off : off+int(optlen)]); err != nil {
+			return nil, len(msg), err
+		}
+		edns = append(edns, e)
+		off += int(optlen)
+	case EDNS0N3U:
+		e := new(EDNS0_N3U)
+		if err := e.unpack(msg[off : off+int(optlen)]); err != nil {
+			return nil, len(msg), err
+		}
+		edns = append(edns, e)
+		off += int(optlen)
+	default:
+		e := new(EDNS0_LOCAL)
+		e.Code = code
+		if err := e.unpack(msg[off : off+int(optlen)]); err != nil {
+			return nil, len(msg), err
+		}
+		edns = append(edns, e)
+		off += int(optlen)
+	}
+
+	if off < len(msg) {
+		goto Option
+	}
+
+	return edns, off, nil
+}
+
+func packDataOpt(options []EDNS0, msg []byte, off int) (int, error) {
+	for _, el := range options {
+		b, err := el.pack()
+		if err != nil || off+3 > len(msg) {
+			return len(msg), &Error{err: "overflow packing opt"}
+		}
+		binary.BigEndian.PutUint16(msg[off:], el.Option())      // Option code
+		binary.BigEndian.PutUint16(msg[off+2:], uint16(len(b))) // Length
+		off += 4
+		if off+len(b) > len(msg) {
+			copy(msg[off:], b)
+			off = len(msg)
+			continue
+		}
+		// Actual data
+		copy(msg[off:off+len(b)], b)
+		off += len(b)
+	}
+	return off, nil
+}
+
+func unpackStringOctet(msg []byte, off int) (string, int, error) {
+	s := string(msg[off:])
+	return s, len(msg), nil
+}
+
+func packStringOctet(s string, msg []byte, off int) (int, error) {
+	txtTmp := make([]byte, 256*4+1)
+	off, err := packOctetString(s, msg, off, txtTmp)
+	if err != nil {
+		return len(msg), err
+	}
+	return off, nil
+}
+
+func unpackDataNsec(msg []byte, off int) ([]uint16, int, error) {
+	var nsec []uint16
+	length, window, lastwindow := 0, 0, -1
+	for off < len(msg) {
+		if off+2 > len(msg) {
+			return nsec, len(msg), &Error{err: "overflow unpacking nsecx"}
+		}
+		window = int(msg[off])
+		length = int(msg[off+1])
+		off += 2
+		if window <= lastwindow {
+			// RFC 4034: Blocks are present in the NSEC RR RDATA in
+			// increasing numerical order.
+			return nsec, len(msg), &Error{err: "out of order NSEC block"}
+		}
+		if length == 0 {
+			// RFC 4034: Blocks with no types present MUST NOT be included.
+			return nsec, len(msg), &Error{err: "empty NSEC block"}
+		}
+		if length > 32 {
+			return nsec, len(msg), &Error{err: "NSEC block too long"}
+		}
+		if off+length > len(msg) {
+			return nsec, len(msg), &Error{err: "overflowing NSEC block"}
+		}
+
+		// Walk the bytes in the window and extract the type bits
+		for j := 0; j < length; j++ {
+			b := msg[off+j]
+			// Check the bits one by one, and set the type
+			if b&0x80 == 0x80 {
+				nsec = append(nsec, uint16(window*256+j*8+0))
+			}
+			if b&0x40 == 0x40 {
+				nsec = append(nsec, uint16(window*256+j*8+1))
+			}
+			if b&0x20 == 0x20 {
+				nsec = append(nsec, uint16(window*256+j*8+2))
+			}
+			if b&0x10 == 0x10 {
+				nsec = append(nsec, uint16(window*256+j*8+3))
+			}
+			if b&0x8 == 0x8 {
+				nsec = append(nsec, uint16(window*256+j*8+4))
+			}
+			if b&0x4 == 0x4 {
+				nsec = append(nsec, uint16(window*256+j*8+5))
+			}
+			if b&0x2 == 0x2 {
+				nsec = append(nsec, uint16(window*256+j*8+6))
+			}
+			if b&0x1 == 0x1 {
+				nsec = append(nsec, uint16(window*256+j*8+7))
+			}
+		}
+		off += length
+		lastwindow = window
+	}
+	return nsec, off, nil
+}
+
+func packDataNsec(bitmap []uint16, msg []byte, off int) (int, error) {
+	if len(bitmap) == 0 {
+		return off, nil
+	}
+	var lastwindow, lastlength uint16
+	for j := 0; j < len(bitmap); j++ {
+		t := bitmap[j]
+		window := t / 256
+		length := (t-window*256)/8 + 1
+		if window > lastwindow && lastlength != 0 { // New window, jump to the new offset
+			off += int(lastlength) + 2
+			lastlength = 0
+		}
+		if window < lastwindow || length < lastlength {
+			return len(msg), &Error{err: "nsec bits out of order"}
+		}
+		if off+2+int(length) > len(msg) {
+			return len(msg), &Error{err: "overflow packing nsec"}
+		}
+		// Setting the window #
+		msg[off] = byte(window)
+		// Setting the octets length
+		msg[off+1] = byte(length)
+		// Setting the bit value for the type in the right octet
+		msg[off+1+int(length)] |= byte(1 << (7 - (t % 8)))
+		lastwindow, lastlength = window, length
+	}
+	off += int(lastlength) + 2
+	return off, nil
+}
+
+func unpackDataDomainNames(msg []byte, off, end int) ([]string, int, error) {
+	var (
+		servers []string
+		s       string
+		err     error
+	)
+	if end > len(msg) {
+		return nil, len(msg), &Error{err: "overflow unpacking domain names"}
+	}
+	for off < end {
+		s, off, err = UnpackDomainName(msg, off)
+		if err != nil {
+			return servers, len(msg), err
+		}
+		servers = append(servers, s)
+	}
+	return servers, off, nil
+}
+
+func packDataDomainNames(names []string, msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	var err error
+	for j := 0; j < len(names); j++ {
+		off, err = PackDomainName(names[j], msg, off, compression, false && compress)
+		if err != nil {
+			return len(msg), err
+		}
+	}
+	return off, nil
+}

+ 10 - 3
vendor/github.com/miekg/dns/nsecx.go

@@ -11,13 +11,12 @@ type saltWireFmt struct {
 	Salt string `dns:"size-hex"`
 	Salt string `dns:"size-hex"`
 }
 }
 
 
-// HashName hashes a string (label) according to RFC 5155. It returns the hashed string in
-// uppercase.
+// HashName hashes a string (label) according to RFC 5155. It returns the hashed string in uppercase.
 func HashName(label string, ha uint8, iter uint16, salt string) string {
 func HashName(label string, ha uint8, iter uint16, salt string) string {
 	saltwire := new(saltWireFmt)
 	saltwire := new(saltWireFmt)
 	saltwire.Salt = salt
 	saltwire.Salt = salt
 	wire := make([]byte, DefaultMsgSize)
 	wire := make([]byte, DefaultMsgSize)
-	n, err := PackStruct(saltwire, wire, 0)
+	n, err := packSaltWire(saltwire, wire)
 	if err != nil {
 	if err != nil {
 		return ""
 		return ""
 	}
 	}
@@ -110,3 +109,11 @@ func (rr *NSEC3) Match(name string) bool {
 	}
 	}
 	return false
 	return false
 }
 }
+
+func packSaltWire(sw *saltWireFmt, msg []byte) (int, error) {
+	off, err := packStringHex(sw.Salt, msg, 0)
+	if err != nil {
+		return off, err
+	}
+	return off, nil
+}

+ 0 - 29
vendor/github.com/miekg/dns/nsecx_test.go

@@ -1,29 +0,0 @@
-package dns
-
-import (
-	"testing"
-)
-
-func TestPackNsec3(t *testing.T) {
-	nsec3 := HashName("dnsex.nl.", SHA1, 0, "DEAD")
-	if nsec3 != "ROCCJAE8BJJU7HN6T7NG3TNM8ACRS87J" {
-		t.Error(nsec3)
-	}
-
-	nsec3 = HashName("a.b.c.example.org.", SHA1, 2, "DEAD")
-	if nsec3 != "6LQ07OAHBTOOEU2R9ANI2AT70K5O0RCG" {
-		t.Error(nsec3)
-	}
-}
-
-func TestNsec3(t *testing.T) {
-	// examples taken from .nl
-	nsec3, _ := NewRR("39p91242oslggest5e6a7cci4iaeqvnk.nl. IN NSEC3 1 1 5 F10E9F7EA83FC8F3 39P99DCGG0MDLARTCRMCF6OFLLUL7PR6 NS DS RRSIG")
-	if !nsec3.(*NSEC3).Cover("snasajsksasasa.nl.") { // 39p94jrinub66hnpem8qdpstrec86pg3
-		t.Error("39p94jrinub66hnpem8qdpstrec86pg3. should be covered by 39p91242oslggest5e6a7cci4iaeqvnk.nl. - 39P99DCGG0MDLARTCRMCF6OFLLUL7PR6")
-	}
-	nsec3, _ = NewRR("sk4e8fj94u78smusb40o1n0oltbblu2r.nl. IN NSEC3 1 1 5 F10E9F7EA83FC8F3 SK4F38CQ0ATIEI8MH3RGD0P5I4II6QAN NS SOA TXT RRSIG DNSKEY NSEC3PARAM")
-	if !nsec3.(*NSEC3).Match("nl.") { // sk4e8fj94u78smusb40o1n0oltbblu2r.nl.
-		t.Error("sk4e8fj94u78smusb40o1n0oltbblu2r.nl. should match sk4e8fj94u78smusb40o1n0oltbblu2r.nl.")
-	}
-}

File diff suppressed because it is too large
+ 0 - 1381
vendor/github.com/miekg/dns/parse_test.go


+ 34 - 2
vendor/github.com/miekg/dns/privaterr.go

@@ -65,6 +65,20 @@ func (r *PrivateRR) copy() RR {
 	}
 	}
 	return rr
 	return rr
 }
 }
+func (r *PrivateRR) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := r.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	n, err := r.Data.Pack(msg[off:])
+	if err != nil {
+		return len(msg), err
+	}
+	off += n
+	r.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
 
 
 // PrivateHandle registers a private resource record type. It requires
 // PrivateHandle registers a private resource record type. It requires
 // string and numeric representation of private RR type and generator function as argument.
 // string and numeric representation of private RR type and generator function as argument.
@@ -75,19 +89,36 @@ func PrivateHandle(rtypestr string, rtype uint16, generator func() PrivateRdata)
 	TypeToString[rtype] = rtypestr
 	TypeToString[rtype] = rtypestr
 	StringToType[rtypestr] = rtype
 	StringToType[rtypestr] = rtype
 
 
+	typeToUnpack[rtype] = func(h RR_Header, msg []byte, off int) (RR, int, error) {
+		if noRdata(h) {
+			return &h, off, nil
+		}
+		var err error
+
+		rr := mkPrivateRR(h.Rrtype)
+		rr.Hdr = h
+
+		off1, err := rr.Data.Unpack(msg[off:])
+		off += off1
+		if err != nil {
+			return rr, off, err
+		}
+		return rr, off, err
+	}
+
 	setPrivateRR := func(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) {
 	setPrivateRR := func(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) {
 		rr := mkPrivateRR(h.Rrtype)
 		rr := mkPrivateRR(h.Rrtype)
 		rr.Hdr = h
 		rr.Hdr = h
 
 
 		var l lex
 		var l lex
 		text := make([]string, 0, 2) // could be 0..N elements, median is probably 1
 		text := make([]string, 0, 2) // could be 0..N elements, median is probably 1
-	FETCH:
+	Fetch:
 		for {
 		for {
 			// TODO(miek): we could also be returning _QUOTE, this might or might not
 			// TODO(miek): we could also be returning _QUOTE, this might or might not
 			// be an issue (basically parsing TXT becomes hard)
 			// be an issue (basically parsing TXT becomes hard)
 			switch l = <-c; l.value {
 			switch l = <-c; l.value {
 			case zNewline, zEOF:
 			case zNewline, zEOF:
-				break FETCH
+				break Fetch
 			case zString:
 			case zString:
 				text = append(text, l.token)
 				text = append(text, l.token)
 			}
 			}
@@ -112,6 +143,7 @@ func PrivateHandleRemove(rtype uint16) {
 		delete(TypeToString, rtype)
 		delete(TypeToString, rtype)
 		delete(typeToparserFunc, rtype)
 		delete(typeToparserFunc, rtype)
 		delete(StringToType, rtypestr)
 		delete(StringToType, rtypestr)
+		delete(typeToUnpack, rtype)
 	}
 	}
 	return
 	return
 }
 }

+ 0 - 170
vendor/github.com/miekg/dns/privaterr_test.go

@@ -1,170 +0,0 @@
-package dns_test
-
-import (
-	"strings"
-	"testing"
-
-	"github.com/miekg/dns"
-)
-
-const TypeISBN uint16 = 0x0F01
-
-// A crazy new RR type :)
-type ISBN struct {
-	x string // rdata with 10 or 13 numbers, dashes or spaces allowed
-}
-
-func NewISBN() dns.PrivateRdata { return &ISBN{""} }
-
-func (rd *ISBN) Len() int       { return len([]byte(rd.x)) }
-func (rd *ISBN) String() string { return rd.x }
-
-func (rd *ISBN) Parse(txt []string) error {
-	rd.x = strings.TrimSpace(strings.Join(txt, " "))
-	return nil
-}
-
-func (rd *ISBN) Pack(buf []byte) (int, error) {
-	b := []byte(rd.x)
-	n := copy(buf, b)
-	if n != len(b) {
-		return n, dns.ErrBuf
-	}
-	return n, nil
-}
-
-func (rd *ISBN) Unpack(buf []byte) (int, error) {
-	rd.x = string(buf)
-	return len(buf), nil
-}
-
-func (rd *ISBN) Copy(dest dns.PrivateRdata) error {
-	isbn, ok := dest.(*ISBN)
-	if !ok {
-		return dns.ErrRdata
-	}
-	isbn.x = rd.x
-	return nil
-}
-
-var testrecord = strings.Join([]string{"example.org.", "3600", "IN", "ISBN", "12-3 456789-0-123"}, "\t")
-
-func TestPrivateText(t *testing.T) {
-	dns.PrivateHandle("ISBN", TypeISBN, NewISBN)
-	defer dns.PrivateHandleRemove(TypeISBN)
-
-	rr, err := dns.NewRR(testrecord)
-	if err != nil {
-		t.Fatal(err)
-	}
-	if rr.String() != testrecord {
-		t.Errorf("record string representation did not match original %#v != %#v", rr.String(), testrecord)
-	} else {
-		t.Log(rr.String())
-	}
-}
-
-func TestPrivateByteSlice(t *testing.T) {
-	dns.PrivateHandle("ISBN", TypeISBN, NewISBN)
-	defer dns.PrivateHandleRemove(TypeISBN)
-
-	rr, err := dns.NewRR(testrecord)
-	if err != nil {
-		t.Fatal(err)
-	}
-
-	buf := make([]byte, 100)
-	off, err := dns.PackRR(rr, buf, 0, nil, false)
-	if err != nil {
-		t.Errorf("got error packing ISBN: %v", err)
-	}
-
-	custrr := rr.(*dns.PrivateRR)
-	if ln := custrr.Data.Len() + len(custrr.Header().Name) + 11; ln != off {
-		t.Errorf("offset is not matching to length of Private RR: %d!=%d", off, ln)
-	}
-
-	rr1, off1, err := dns.UnpackRR(buf[:off], 0)
-	if err != nil {
-		t.Errorf("got error unpacking ISBN: %v", err)
-	}
-
-	if off1 != off {
-		t.Errorf("offset after unpacking differs: %d != %d", off1, off)
-	}
-
-	if rr1.String() != testrecord {
-		t.Errorf("record string representation did not match original %#v != %#v", rr1.String(), testrecord)
-	} else {
-		t.Log(rr1.String())
-	}
-}
-
-const TypeVERSION uint16 = 0x0F02
-
-type VERSION struct {
-	x string
-}
-
-func NewVersion() dns.PrivateRdata { return &VERSION{""} }
-
-func (rd *VERSION) String() string { return rd.x }
-func (rd *VERSION) Parse(txt []string) error {
-	rd.x = strings.TrimSpace(strings.Join(txt, " "))
-	return nil
-}
-
-func (rd *VERSION) Pack(buf []byte) (int, error) {
-	b := []byte(rd.x)
-	n := copy(buf, b)
-	if n != len(b) {
-		return n, dns.ErrBuf
-	}
-	return n, nil
-}
-
-func (rd *VERSION) Unpack(buf []byte) (int, error) {
-	rd.x = string(buf)
-	return len(buf), nil
-}
-
-func (rd *VERSION) Copy(dest dns.PrivateRdata) error {
-	isbn, ok := dest.(*VERSION)
-	if !ok {
-		return dns.ErrRdata
-	}
-	isbn.x = rd.x
-	return nil
-}
-
-func (rd *VERSION) Len() int {
-	return len([]byte(rd.x))
-}
-
-var smallzone = `$ORIGIN example.org.
-@ SOA	sns.dns.icann.org. noc.dns.icann.org. (
-		2014091518 7200 3600 1209600 3600
-)
-    A   1.2.3.4
-ok ISBN 1231-92110-12
-go VERSION (
-	1.3.1 ; comment
-)
-www ISBN 1231-92110-16
-*  CNAME @
-`
-
-func TestPrivateZoneParser(t *testing.T) {
-	dns.PrivateHandle("ISBN", TypeISBN, NewISBN)
-	dns.PrivateHandle("VERSION", TypeVERSION, NewVersion)
-	defer dns.PrivateHandleRemove(TypeISBN)
-	defer dns.PrivateHandleRemove(TypeVERSION)
-
-	r := strings.NewReader(smallzone)
-	for x := range dns.ParseZone(r, ".", "") {
-		if err := x.Error; err != nil {
-			t.Fatal(err)
-		}
-		t.Log(x.RR)
-	}
-}

+ 2 - 48
vendor/github.com/miekg/dns/rawmsg.go

@@ -1,52 +1,6 @@
 package dns
 package dns
 
 
-// These raw* functions do not use reflection, they directly set the values
-// in the buffer. There are faster than their reflection counterparts.
-
-// RawSetId sets the message id in buf.
-func rawSetId(msg []byte, i uint16) bool {
-	if len(msg) < 2 {
-		return false
-	}
-	msg[0], msg[1] = packUint16(i)
-	return true
-}
-
-// rawSetQuestionLen sets the length of the question section.
-func rawSetQuestionLen(msg []byte, i uint16) bool {
-	if len(msg) < 6 {
-		return false
-	}
-	msg[4], msg[5] = packUint16(i)
-	return true
-}
-
-// rawSetAnswerLen sets the length of the answer section.
-func rawSetAnswerLen(msg []byte, i uint16) bool {
-	if len(msg) < 8 {
-		return false
-	}
-	msg[6], msg[7] = packUint16(i)
-	return true
-}
-
-// rawSetsNsLen sets the length of the authority section.
-func rawSetNsLen(msg []byte, i uint16) bool {
-	if len(msg) < 10 {
-		return false
-	}
-	msg[8], msg[9] = packUint16(i)
-	return true
-}
-
-// rawSetExtraLen sets the length of the additional section.
-func rawSetExtraLen(msg []byte, i uint16) bool {
-	if len(msg) < 12 {
-		return false
-	}
-	msg[10], msg[11] = packUint16(i)
-	return true
-}
+import "encoding/binary"
 
 
 // rawSetRdlength sets the rdlength in the header of
 // rawSetRdlength sets the rdlength in the header of
 // the RR. The offset 'off' must be positioned at the
 // the RR. The offset 'off' must be positioned at the
@@ -90,6 +44,6 @@ Loop:
 	if rdatalen > 0xFFFF {
 	if rdatalen > 0xFFFF {
 		return false
 		return false
 	}
 	}
-	msg[off], msg[off+1] = packUint16(uint16(rdatalen))
+	binary.BigEndian.PutUint16(msg[off:], uint16(rdatalen))
 	return true
 	return true
 }
 }

+ 0 - 19
vendor/github.com/miekg/dns/remote_test.go

@@ -1,19 +0,0 @@
-package dns
-
-import "testing"
-
-const LinodeAddr = "176.58.119.54:53"
-
-func TestClientRemote(t *testing.T) {
-	m := new(Msg)
-	m.SetQuestion("go.dns.miek.nl.", TypeTXT)
-
-	c := new(Client)
-	r, _, err := c.Exchange(m, LinodeAddr)
-	if err != nil {
-		t.Errorf("failed to exchange: %v", err)
-	}
-	if r != nil && r.Rcode != RcodeSuccess {
-		t.Errorf("failed to get an valid answer\n%v", r)
-	}
-}

+ 38 - 0
vendor/github.com/miekg/dns/reverse.go

@@ -0,0 +1,38 @@
+package dns
+
+// StringToType is the reverse of TypeToString, needed for string parsing.
+var StringToType = reverseInt16(TypeToString)
+
+// StringToClass is the reverse of ClassToString, needed for string parsing.
+var StringToClass = reverseInt16(ClassToString)
+
+// Map of opcodes strings.
+var StringToOpcode = reverseInt(OpcodeToString)
+
+// Map of rcodes strings.
+var StringToRcode = reverseInt(RcodeToString)
+
+// Reverse a map
+func reverseInt8(m map[uint8]string) map[string]uint8 {
+	n := make(map[string]uint8, len(m))
+	for u, s := range m {
+		n[s] = u
+	}
+	return n
+}
+
+func reverseInt16(m map[uint16]string) map[string]uint16 {
+	n := make(map[string]uint16, len(m))
+	for u, s := range m {
+		n[s] = u
+	}
+	return n
+}
+
+func reverseInt(m map[int]string) map[string]int {
+	n := make(map[string]int, len(m))
+	for u, s := range m {
+		n[s] = u
+	}
+	return n
+}

+ 0 - 85
vendor/github.com/miekg/dns/sanitize_test.go

@@ -1,85 +0,0 @@
-package dns
-
-import "testing"
-
-func TestDedup(t *testing.T) {
-	// make it []string
-	testcases := map[[3]RR][]string{
-		[...]RR{
-			newRR(t, "mIek.nl. IN A 127.0.0.1"),
-			newRR(t, "mieK.nl. IN A 127.0.0.1"),
-			newRR(t, "miek.Nl. IN A 127.0.0.1"),
-		}: {"mIek.nl.\t3600\tIN\tA\t127.0.0.1"},
-		[...]RR{
-			newRR(t, "miEk.nl. 2000 IN A 127.0.0.1"),
-			newRR(t, "mieK.Nl. 1000 IN A 127.0.0.1"),
-			newRR(t, "Miek.nL. 500 IN A 127.0.0.1"),
-		}: {"miEk.nl.\t500\tIN\tA\t127.0.0.1"},
-		[...]RR{
-			newRR(t, "miek.nl. IN A 127.0.0.1"),
-			newRR(t, "miek.nl. CH A 127.0.0.1"),
-			newRR(t, "miek.nl. IN A 127.0.0.1"),
-		}: {"miek.nl.\t3600\tIN\tA\t127.0.0.1",
-			"miek.nl.\t3600\tCH\tA\t127.0.0.1",
-		},
-		[...]RR{
-			newRR(t, "miek.nl. CH A 127.0.0.1"),
-			newRR(t, "miek.nl. IN A 127.0.0.1"),
-			newRR(t, "miek.de. IN A 127.0.0.1"),
-		}: {"miek.nl.\t3600\tCH\tA\t127.0.0.1",
-			"miek.nl.\t3600\tIN\tA\t127.0.0.1",
-			"miek.de.\t3600\tIN\tA\t127.0.0.1",
-		},
-		[...]RR{
-			newRR(t, "miek.de. IN A 127.0.0.1"),
-			newRR(t, "miek.nl. 200 IN A 127.0.0.1"),
-			newRR(t, "miek.nl. 300 IN A 127.0.0.1"),
-		}: {"miek.de.\t3600\tIN\tA\t127.0.0.1",
-			"miek.nl.\t200\tIN\tA\t127.0.0.1",
-		},
-	}
-
-	for rr, expected := range testcases {
-		out := Dedup([]RR{rr[0], rr[1], rr[2]}, nil)
-		for i, o := range out {
-			if o.String() != expected[i] {
-				t.Fatalf("expected %v, got %v", expected[i], o.String())
-			}
-		}
-	}
-}
-
-func BenchmarkDedup(b *testing.B) {
-	rrs := []RR{
-		newRR(nil, "miEk.nl. 2000 IN A 127.0.0.1"),
-		newRR(nil, "mieK.Nl. 1000 IN A 127.0.0.1"),
-		newRR(nil, "Miek.nL. 500 IN A 127.0.0.1"),
-	}
-	m := make(map[string]RR)
-	for i := 0; i < b.N; i++ {
-		Dedup(rrs, m)
-	}
-}
-
-func TestNormalizedString(t *testing.T) {
-	tests := map[RR]string{
-		newRR(t, "mIEk.Nl. 3600 IN A 127.0.0.1"):     "miek.nl.\tIN\tA\t127.0.0.1",
-		newRR(t, "m\\ iek.nL. 3600 IN A 127.0.0.1"):  "m\\ iek.nl.\tIN\tA\t127.0.0.1",
-		newRR(t, "m\\\tIeK.nl. 3600 in A 127.0.0.1"): "m\\tiek.nl.\tIN\tA\t127.0.0.1",
-	}
-	for tc, expected := range tests {
-		n := normalizedString(tc)
-		if n != expected {
-			t.Logf("expected %s, got %s", expected, n)
-			t.Fail()
-		}
-	}
-}
-
-func newRR(t *testing.T, s string) RR {
-	r, e := NewRR(s)
-	if e != nil {
-		t.Logf("newRR: %s", e)
-	}
-	return r
-}

+ 11 - 4
vendor/github.com/miekg/dns/zscan.go → vendor/github.com/miekg/dns/scan.go

@@ -377,8 +377,8 @@ func parseZone(r io.Reader, origin, f string, t chan *Token, include int) {
 				t <- &Token{Error: &ParseError{f, "expecting $GENERATE value, not this...", l}}
 				t <- &Token{Error: &ParseError{f, "expecting $GENERATE value, not this...", l}}
 				return
 				return
 			}
 			}
-			if e := generate(l, c, t, origin); e != "" {
-				t <- &Token{Error: &ParseError{f, e, l}}
+			if errMsg := generate(l, c, t, origin); errMsg != "" {
+				t <- &Token{Error: &ParseError{f, errMsg, l}}
 				return
 				return
 			}
 			}
 			st = zExpectOwnerDir
 			st = zExpectOwnerDir
@@ -627,6 +627,7 @@ func zlexer(s *scan, c chan lex) {
 			if stri > 0 {
 			if stri > 0 {
 				l.value = zString
 				l.value = zString
 				l.token = string(str[:stri])
 				l.token = string(str[:stri])
+				l.tokenUpper = strings.ToUpper(l.token)
 				l.length = stri
 				l.length = stri
 				debug.Printf("[4 %+v]", l.token)
 				debug.Printf("[4 %+v]", l.token)
 				c <- l
 				c <- l
@@ -663,6 +664,7 @@ func zlexer(s *scan, c chan lex) {
 					owner = true
 					owner = true
 					l.value = zNewline
 					l.value = zNewline
 					l.token = "\n"
 					l.token = "\n"
+					l.tokenUpper = l.token
 					l.length = 1
 					l.length = 1
 					l.comment = string(com[:comi])
 					l.comment = string(com[:comi])
 					debug.Printf("[3 %+v %+v]", l.token, l.comment)
 					debug.Printf("[3 %+v %+v]", l.token, l.comment)
@@ -696,6 +698,7 @@ func zlexer(s *scan, c chan lex) {
 				}
 				}
 				l.value = zNewline
 				l.value = zNewline
 				l.token = "\n"
 				l.token = "\n"
+				l.tokenUpper = l.token
 				l.length = 1
 				l.length = 1
 				debug.Printf("[1 %+v]", l.token)
 				debug.Printf("[1 %+v]", l.token)
 				c <- l
 				c <- l
@@ -740,6 +743,7 @@ func zlexer(s *scan, c chan lex) {
 			if stri != 0 {
 			if stri != 0 {
 				l.value = zString
 				l.value = zString
 				l.token = string(str[:stri])
 				l.token = string(str[:stri])
+				l.tokenUpper = strings.ToUpper(l.token)
 				l.length = stri
 				l.length = stri
 
 
 				debug.Printf("[%+v]", l.token)
 				debug.Printf("[%+v]", l.token)
@@ -750,6 +754,7 @@ func zlexer(s *scan, c chan lex) {
 			// send quote itself as separate token
 			// send quote itself as separate token
 			l.value = zQuote
 			l.value = zQuote
 			l.token = "\""
 			l.token = "\""
+			l.tokenUpper = l.token
 			l.length = 1
 			l.length = 1
 			c <- l
 			c <- l
 			quote = !quote
 			quote = !quote
@@ -775,6 +780,7 @@ func zlexer(s *scan, c chan lex) {
 				brace--
 				brace--
 				if brace < 0 {
 				if brace < 0 {
 					l.token = "extra closing brace"
 					l.token = "extra closing brace"
+					l.tokenUpper = l.token
 					l.err = true
 					l.err = true
 					debug.Printf("[%+v]", l.token)
 					debug.Printf("[%+v]", l.token)
 					c <- l
 					c <- l
@@ -799,6 +805,7 @@ func zlexer(s *scan, c chan lex) {
 	if stri > 0 {
 	if stri > 0 {
 		// Send remainder
 		// Send remainder
 		l.token = string(str[:stri])
 		l.token = string(str[:stri])
+		l.tokenUpper = strings.ToUpper(l.token)
 		l.length = stri
 		l.length = stri
 		l.value = zString
 		l.value = zString
 		debug.Printf("[%+v]", l.token)
 		debug.Printf("[%+v]", l.token)
@@ -966,8 +973,8 @@ func stringToNodeID(l lex) (uint64, *ParseError) {
 		return 0, &ParseError{l.token, "bad NID/L64 NodeID/Locator64", l}
 		return 0, &ParseError{l.token, "bad NID/L64 NodeID/Locator64", l}
 	}
 	}
 	s := l.token[0:4] + l.token[5:9] + l.token[10:14] + l.token[15:19]
 	s := l.token[0:4] + l.token[5:9] + l.token[10:14] + l.token[15:19]
-	u, e := strconv.ParseUint(s, 16, 64)
-	if e != nil {
+	u, err := strconv.ParseUint(s, 16, 64)
+	if err != nil {
 		return 0, &ParseError{l.token, "bad NID/L64 NodeID/Locator64", l}
 		return 0, &ParseError{l.token, "bad NID/L64 NodeID/Locator64", l}
 	}
 	}
 	return u, nil
 	return u, nil

+ 36 - 127
vendor/github.com/miekg/dns/zscan_rr.go → vendor/github.com/miekg/dns/scan_rr.go

@@ -1443,64 +1443,6 @@ func setEUI64(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) {
 	return rr, nil, ""
 	return rr, nil, ""
 }
 }
 
 
-func setWKS(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) {
-	rr := new(WKS)
-	rr.Hdr = h
-
-	l := <-c
-	if l.length == 0 {
-		return rr, nil, l.comment
-	}
-	rr.Address = net.ParseIP(l.token)
-	if rr.Address == nil || l.err {
-		return nil, &ParseError{f, "bad WKS Address", l}, ""
-	}
-
-	<-c // zBlank
-	l = <-c
-	proto := "tcp"
-	i, e := strconv.Atoi(l.token)
-	if e != nil || l.err {
-		return nil, &ParseError{f, "bad WKS Protocol", l}, ""
-	}
-	rr.Protocol = uint8(i)
-	switch rr.Protocol {
-	case 17:
-		proto = "udp"
-	case 6:
-		proto = "tcp"
-	default:
-		return nil, &ParseError{f, "bad WKS Protocol", l}, ""
-	}
-
-	<-c
-	l = <-c
-	rr.BitMap = make([]uint16, 0)
-	var (
-		k   int
-		err error
-	)
-	for l.value != zNewline && l.value != zEOF {
-		switch l.value {
-		case zBlank:
-			// Ok
-		case zString:
-			if k, err = net.LookupPort(proto, l.token); err != nil {
-				i, e := strconv.Atoi(l.token) // If a number use that
-				if e != nil {
-					return nil, &ParseError{f, "bad WKS BitMap", l}, ""
-				}
-				rr.BitMap = append(rr.BitMap, uint16(i))
-			}
-			rr.BitMap = append(rr.BitMap, uint16(k))
-		default:
-			return nil, &ParseError{f, "bad WKS BitMap", l}, ""
-		}
-		l = <-c
-	}
-	return rr, nil, l.comment
-}
-
 func setSSHFP(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) {
 func setSSHFP(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) {
 	rr := new(SSHFP)
 	rr := new(SSHFP)
 	rr.Hdr = h
 	rr.Hdr = h
@@ -1804,6 +1746,41 @@ func setTLSA(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) {
 	return rr, nil, c1
 	return rr, nil, c1
 }
 }
 
 
+func setSMIMEA(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) {
+	rr := new(SMIMEA)
+	rr.Hdr = h
+	l := <-c
+	if l.length == 0 {
+		return rr, nil, l.comment
+	}
+	i, e := strconv.Atoi(l.token)
+	if e != nil || l.err {
+		return nil, &ParseError{f, "bad SMIMEA Usage", l}, ""
+	}
+	rr.Usage = uint8(i)
+	<-c // zBlank
+	l = <-c
+	i, e = strconv.Atoi(l.token)
+	if e != nil || l.err {
+		return nil, &ParseError{f, "bad SMIMEA Selector", l}, ""
+	}
+	rr.Selector = uint8(i)
+	<-c // zBlank
+	l = <-c
+	i, e = strconv.Atoi(l.token)
+	if e != nil || l.err {
+		return nil, &ParseError{f, "bad SMIMEA MatchingType", l}, ""
+	}
+	rr.MatchingType = uint8(i)
+	// So this needs be e2 (i.e. different than e), because...??t
+	s, e2, c1 := endingToString(c, "bad SMIMEA Certificate", f)
+	if e2 != nil {
+		return nil, e2, c1
+	}
+	rr.Certificate = s
+	return rr, nil, c1
+}
+
 func setRFC3597(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) {
 func setRFC3597(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) {
 	rr := new(RFC3597)
 	rr := new(RFC3597)
 	rr.Hdr = h
 	rr.Hdr = h
@@ -2103,73 +2080,6 @@ func setPX(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) {
 	return rr, nil, ""
 	return rr, nil, ""
 }
 }
 
 
-func setIPSECKEY(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) {
-	rr := new(IPSECKEY)
-	rr.Hdr = h
-	l := <-c
-	if l.length == 0 {
-		return rr, nil, l.comment
-	}
-	i, err := strconv.Atoi(l.token)
-	if err != nil || l.err {
-		return nil, &ParseError{f, "bad IPSECKEY Precedence", l}, ""
-	}
-	rr.Precedence = uint8(i)
-	<-c // zBlank
-	l = <-c
-	i, err = strconv.Atoi(l.token)
-	if err != nil || l.err {
-		return nil, &ParseError{f, "bad IPSECKEY GatewayType", l}, ""
-	}
-	rr.GatewayType = uint8(i)
-	<-c // zBlank
-	l = <-c
-	i, err = strconv.Atoi(l.token)
-	if err != nil || l.err {
-		return nil, &ParseError{f, "bad IPSECKEY Algorithm", l}, ""
-	}
-	rr.Algorithm = uint8(i)
-
-	// Now according to GatewayType we can have different elements here
-	<-c // zBlank
-	l = <-c
-	switch rr.GatewayType {
-	case 0:
-		fallthrough
-	case 3:
-		rr.GatewayName = l.token
-		if l.token == "@" {
-			rr.GatewayName = o
-		}
-		_, ok := IsDomainName(l.token)
-		if !ok || l.length == 0 || l.err {
-			return nil, &ParseError{f, "bad IPSECKEY GatewayName", l}, ""
-		}
-		if rr.GatewayName[l.length-1] != '.' {
-			rr.GatewayName = appendOrigin(rr.GatewayName, o)
-		}
-	case 1:
-		rr.GatewayA = net.ParseIP(l.token)
-		if rr.GatewayA == nil {
-			return nil, &ParseError{f, "bad IPSECKEY GatewayA", l}, ""
-		}
-	case 2:
-		rr.GatewayAAAA = net.ParseIP(l.token)
-		if rr.GatewayAAAA == nil {
-			return nil, &ParseError{f, "bad IPSECKEY GatewayAAAA", l}, ""
-		}
-	default:
-		return nil, &ParseError{f, "bad IPSECKEY GatewayType", l}, ""
-	}
-
-	s, e, c1 := endingToString(c, "bad IPSECKEY PublicKey", f)
-	if e != nil {
-		return nil, e, c1
-	}
-	rr.PublicKey = s
-	return rr, nil, c1
-}
-
 func setCAA(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) {
 func setCAA(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) {
 	rr := new(CAA)
 	rr := new(CAA)
 	rr.Hdr = h
 	rr.Hdr = h
@@ -2224,7 +2134,6 @@ var typeToparserFunc = map[uint16]parserFunc{
 	TypeGPOS:       {setGPOS, false},
 	TypeGPOS:       {setGPOS, false},
 	TypeHINFO:      {setHINFO, true},
 	TypeHINFO:      {setHINFO, true},
 	TypeHIP:        {setHIP, true},
 	TypeHIP:        {setHIP, true},
-	TypeIPSECKEY:   {setIPSECKEY, true},
 	TypeKX:         {setKX, false},
 	TypeKX:         {setKX, false},
 	TypeL32:        {setL32, false},
 	TypeL32:        {setL32, false},
 	TypeL64:        {setL64, false},
 	TypeL64:        {setL64, false},
@@ -2254,6 +2163,7 @@ var typeToparserFunc = map[uint16]parserFunc{
 	TypeRP:         {setRP, false},
 	TypeRP:         {setRP, false},
 	TypeRRSIG:      {setRRSIG, true},
 	TypeRRSIG:      {setRRSIG, true},
 	TypeRT:         {setRT, false},
 	TypeRT:         {setRT, false},
+	TypeSMIMEA:     {setSMIMEA, true},
 	TypeSOA:        {setSOA, false},
 	TypeSOA:        {setSOA, false},
 	TypeSPF:        {setSPF, true},
 	TypeSPF:        {setSPF, true},
 	TypeSRV:        {setSRV, false},
 	TypeSRV:        {setSRV, false},
@@ -2265,6 +2175,5 @@ var typeToparserFunc = map[uint16]parserFunc{
 	TypeUID:        {setUID, false},
 	TypeUID:        {setUID, false},
 	TypeUINFO:      {setUINFO, true},
 	TypeUINFO:      {setUINFO, true},
 	TypeURI:        {setURI, true},
 	TypeURI:        {setURI, true},
-	TypeWKS:        {setWKS, true},
 	TypeX25:        {setX25, false},
 	TypeX25:        {setX25, false},
 }
 }

+ 39 - 38
vendor/github.com/miekg/dns/server.go

@@ -5,6 +5,7 @@ package dns
 import (
 import (
 	"bytes"
 	"bytes"
 	"crypto/tls"
 	"crypto/tls"
+	"encoding/binary"
 	"io"
 	"io"
 	"net"
 	"net"
 	"sync"
 	"sync"
@@ -146,7 +147,7 @@ func (mux *ServeMux) match(q string, t uint16) Handler {
 				b[i] |= ('a' - 'A')
 				b[i] |= ('a' - 'A')
 			}
 			}
 		}
 		}
-		if h, ok := mux.z[string(b[:l])]; ok { // 'causes garbage, might want to change the map key
+		if h, ok := mux.z[string(b[:l])]; ok { // causes garbage, might want to change the map key
 			if t != TypeDS {
 			if t != TypeDS {
 				return h
 				return h
 			}
 			}
@@ -320,20 +321,20 @@ func (srv *Server) ListenAndServe() error {
 	}
 	}
 	switch srv.Net {
 	switch srv.Net {
 	case "tcp", "tcp4", "tcp6":
 	case "tcp", "tcp4", "tcp6":
-		a, e := net.ResolveTCPAddr(srv.Net, addr)
-		if e != nil {
-			return e
+		a, err := net.ResolveTCPAddr(srv.Net, addr)
+		if err != nil {
+			return err
 		}
 		}
-		l, e := net.ListenTCP(srv.Net, a)
-		if e != nil {
-			return e
+		l, err := net.ListenTCP(srv.Net, a)
+		if err != nil {
+			return err
 		}
 		}
 		srv.Listener = l
 		srv.Listener = l
 		srv.started = true
 		srv.started = true
 		srv.lock.Unlock()
 		srv.lock.Unlock()
-		e = srv.serveTCP(l)
+		err = srv.serveTCP(l)
 		srv.lock.Lock() // to satisfy the defer at the top
 		srv.lock.Lock() // to satisfy the defer at the top
-		return e
+		return err
 	case "tcp-tls", "tcp4-tls", "tcp6-tls":
 	case "tcp-tls", "tcp4-tls", "tcp6-tls":
 		network := "tcp"
 		network := "tcp"
 		if srv.Net == "tcp4-tls" {
 		if srv.Net == "tcp4-tls" {
@@ -342,24 +343,24 @@ func (srv *Server) ListenAndServe() error {
 			network = "tcp6"
 			network = "tcp6"
 		}
 		}
 
 
-		l, e := tls.Listen(network, addr, srv.TLSConfig)
-		if e != nil {
-			return e
+		l, err := tls.Listen(network, addr, srv.TLSConfig)
+		if err != nil {
+			return err
 		}
 		}
 		srv.Listener = l
 		srv.Listener = l
 		srv.started = true
 		srv.started = true
 		srv.lock.Unlock()
 		srv.lock.Unlock()
-		e = srv.serveTCP(l)
+		err = srv.serveTCP(l)
 		srv.lock.Lock() // to satisfy the defer at the top
 		srv.lock.Lock() // to satisfy the defer at the top
-		return e
+		return err
 	case "udp", "udp4", "udp6":
 	case "udp", "udp4", "udp6":
-		a, e := net.ResolveUDPAddr(srv.Net, addr)
-		if e != nil {
-			return e
+		a, err := net.ResolveUDPAddr(srv.Net, addr)
+		if err != nil {
+			return err
 		}
 		}
-		l, e := net.ListenUDP(srv.Net, a)
-		if e != nil {
-			return e
+		l, err := net.ListenUDP(srv.Net, a)
+		if err != nil {
+			return err
 		}
 		}
 		if e := setUDPSocketOptions(l); e != nil {
 		if e := setUDPSocketOptions(l); e != nil {
 			return e
 			return e
@@ -367,9 +368,9 @@ func (srv *Server) ListenAndServe() error {
 		srv.PacketConn = l
 		srv.PacketConn = l
 		srv.started = true
 		srv.started = true
 		srv.lock.Unlock()
 		srv.lock.Unlock()
-		e = srv.serveUDP(l)
+		err = srv.serveUDP(l)
 		srv.lock.Lock() // to satisfy the defer at the top
 		srv.lock.Lock() // to satisfy the defer at the top
-		return e
+		return err
 	}
 	}
 	return &Error{err: "bad network"}
 	return &Error{err: "bad network"}
 }
 }
@@ -473,21 +474,21 @@ func (srv *Server) serveTCP(l net.Listener) error {
 	rtimeout := srv.getReadTimeout()
 	rtimeout := srv.getReadTimeout()
 	// deadline is not used here
 	// deadline is not used here
 	for {
 	for {
-		rw, e := l.Accept()
-		if e != nil {
-			if neterr, ok := e.(net.Error); ok && neterr.Temporary() {
+		rw, err := l.Accept()
+		if err != nil {
+			if neterr, ok := err.(net.Error); ok && neterr.Temporary() {
 				continue
 				continue
 			}
 			}
-			return e
+			return err
 		}
 		}
-		m, e := reader.ReadTCP(rw, rtimeout)
+		m, err := reader.ReadTCP(rw, rtimeout)
 		srv.lock.RLock()
 		srv.lock.RLock()
 		if !srv.started {
 		if !srv.started {
 			srv.lock.RUnlock()
 			srv.lock.RUnlock()
 			return nil
 			return nil
 		}
 		}
 		srv.lock.RUnlock()
 		srv.lock.RUnlock()
-		if e != nil {
+		if err != nil {
 			continue
 			continue
 		}
 		}
 		srv.inFlight.Add(1)
 		srv.inFlight.Add(1)
@@ -516,14 +517,14 @@ func (srv *Server) serveUDP(l *net.UDPConn) error {
 	rtimeout := srv.getReadTimeout()
 	rtimeout := srv.getReadTimeout()
 	// deadline is not used here
 	// deadline is not used here
 	for {
 	for {
-		m, s, e := reader.ReadUDP(l, rtimeout)
+		m, s, err := reader.ReadUDP(l, rtimeout)
 		srv.lock.RLock()
 		srv.lock.RLock()
 		if !srv.started {
 		if !srv.started {
 			srv.lock.RUnlock()
 			srv.lock.RUnlock()
 			return nil
 			return nil
 		}
 		}
 		srv.lock.RUnlock()
 		srv.lock.RUnlock()
-		if e != nil {
+		if err != nil {
 			continue
 			continue
 		}
 		}
 		srv.inFlight.Add(1)
 		srv.inFlight.Add(1)
@@ -596,8 +597,8 @@ Exit:
 	if srv.IdleTimeout != nil {
 	if srv.IdleTimeout != nil {
 		idleTimeout = srv.IdleTimeout()
 		idleTimeout = srv.IdleTimeout()
 	}
 	}
-	m, e := reader.ReadTCP(w.tcp, idleTimeout)
-	if e == nil {
+	m, err = reader.ReadTCP(w.tcp, idleTimeout)
+	if err == nil {
 		q++
 		q++
 		goto Redo
 		goto Redo
 	}
 	}
@@ -615,7 +616,7 @@ func (srv *Server) readTCP(conn net.Conn, timeout time.Duration) ([]byte, error)
 		}
 		}
 		return nil, ErrShortRead
 		return nil, ErrShortRead
 	}
 	}
-	length, _ := unpackUint16(l, 0)
+	length := binary.BigEndian.Uint16(l)
 	if length == 0 {
 	if length == 0 {
 		return nil, ErrShortRead
 		return nil, ErrShortRead
 	}
 	}
@@ -643,10 +644,10 @@ func (srv *Server) readTCP(conn net.Conn, timeout time.Duration) ([]byte, error)
 func (srv *Server) readUDP(conn *net.UDPConn, timeout time.Duration) ([]byte, *SessionUDP, error) {
 func (srv *Server) readUDP(conn *net.UDPConn, timeout time.Duration) ([]byte, *SessionUDP, error) {
 	conn.SetReadDeadline(time.Now().Add(timeout))
 	conn.SetReadDeadline(time.Now().Add(timeout))
 	m := make([]byte, srv.UDPSize)
 	m := make([]byte, srv.UDPSize)
-	n, s, e := ReadFromSessionUDP(conn, m)
-	if e != nil || n == 0 {
-		if e != nil {
-			return nil, nil, e
+	n, s, err := ReadFromSessionUDP(conn, m)
+	if err != nil || n == 0 {
+		if err != nil {
+			return nil, nil, err
 		}
 		}
 		return nil, nil, ErrShortRead
 		return nil, nil, ErrShortRead
 	}
 	}
@@ -690,7 +691,7 @@ func (w *response) Write(m []byte) (int, error) {
 			return 0, &Error{err: "message too large"}
 			return 0, &Error{err: "message too large"}
 		}
 		}
 		l := make([]byte, 2, 2+lm)
 		l := make([]byte, 2, 2+lm)
-		l[0], l[1] = packUint16(uint16(lm))
+		binary.BigEndian.PutUint16(l, uint16(lm))
 		m = append(l, m...)
 		m = append(l, m...)
 
 
 		n, err := io.Copy(w.tcp, bytes.NewReader(m))
 		n, err := io.Copy(w.tcp, bytes.NewReader(m))

+ 0 - 679
vendor/github.com/miekg/dns/server_test.go

@@ -1,679 +0,0 @@
-package dns
-
-import (
-	"crypto/tls"
-	"fmt"
-	"io"
-	"net"
-	"runtime"
-	"sync"
-	"testing"
-	"time"
-)
-
-func HelloServer(w ResponseWriter, req *Msg) {
-	m := new(Msg)
-	m.SetReply(req)
-
-	m.Extra = make([]RR, 1)
-	m.Extra[0] = &TXT{Hdr: RR_Header{Name: m.Question[0].Name, Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}, Txt: []string{"Hello world"}}
-	w.WriteMsg(m)
-}
-
-func HelloServerBadId(w ResponseWriter, req *Msg) {
-	m := new(Msg)
-	m.SetReply(req)
-	m.Id++
-
-	m.Extra = make([]RR, 1)
-	m.Extra[0] = &TXT{Hdr: RR_Header{Name: m.Question[0].Name, Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}, Txt: []string{"Hello world"}}
-	w.WriteMsg(m)
-}
-
-func AnotherHelloServer(w ResponseWriter, req *Msg) {
-	m := new(Msg)
-	m.SetReply(req)
-
-	m.Extra = make([]RR, 1)
-	m.Extra[0] = &TXT{Hdr: RR_Header{Name: m.Question[0].Name, Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}, Txt: []string{"Hello example"}}
-	w.WriteMsg(m)
-}
-
-func RunLocalUDPServer(laddr string) (*Server, string, error) {
-	server, l, _, err := RunLocalUDPServerWithFinChan(laddr)
-
-	return server, l, err
-}
-
-func RunLocalUDPServerWithFinChan(laddr string) (*Server, string, chan struct{}, error) {
-	pc, err := net.ListenPacket("udp", laddr)
-	if err != nil {
-		return nil, "", nil, err
-	}
-	server := &Server{PacketConn: pc, ReadTimeout: time.Hour, WriteTimeout: time.Hour}
-
-	waitLock := sync.Mutex{}
-	waitLock.Lock()
-	server.NotifyStartedFunc = waitLock.Unlock
-
-	fin := make(chan struct{}, 0)
-
-	go func() {
-		server.ActivateAndServe()
-		close(fin)
-		pc.Close()
-	}()
-
-	waitLock.Lock()
-	return server, pc.LocalAddr().String(), fin, nil
-}
-
-func RunLocalUDPServerUnsafe(laddr string) (*Server, string, error) {
-	pc, err := net.ListenPacket("udp", laddr)
-	if err != nil {
-		return nil, "", err
-	}
-	server := &Server{PacketConn: pc, Unsafe: true,
-		ReadTimeout: time.Hour, WriteTimeout: time.Hour}
-
-	waitLock := sync.Mutex{}
-	waitLock.Lock()
-	server.NotifyStartedFunc = waitLock.Unlock
-
-	go func() {
-		server.ActivateAndServe()
-		pc.Close()
-	}()
-
-	waitLock.Lock()
-	return server, pc.LocalAddr().String(), nil
-}
-
-func RunLocalTCPServer(laddr string) (*Server, string, error) {
-	l, err := net.Listen("tcp", laddr)
-	if err != nil {
-		return nil, "", err
-	}
-
-	server := &Server{Listener: l, ReadTimeout: time.Hour, WriteTimeout: time.Hour}
-
-	waitLock := sync.Mutex{}
-	waitLock.Lock()
-	server.NotifyStartedFunc = waitLock.Unlock
-
-	go func() {
-		server.ActivateAndServe()
-		l.Close()
-	}()
-
-	waitLock.Lock()
-	return server, l.Addr().String(), nil
-}
-
-func RunLocalTLSServer(laddr string, config *tls.Config) (*Server, string, error) {
-	l, err := tls.Listen("tcp", laddr, config)
-	if err != nil {
-		return nil, "", err
-	}
-
-	server := &Server{Listener: l, ReadTimeout: time.Hour, WriteTimeout: time.Hour}
-
-	waitLock := sync.Mutex{}
-	waitLock.Lock()
-	server.NotifyStartedFunc = waitLock.Unlock
-
-	go func() {
-		server.ActivateAndServe()
-		l.Close()
-	}()
-
-	waitLock.Lock()
-	return server, l.Addr().String(), nil
-}
-
-func TestServing(t *testing.T) {
-	HandleFunc("miek.nl.", HelloServer)
-	HandleFunc("example.com.", AnotherHelloServer)
-	defer HandleRemove("miek.nl.")
-	defer HandleRemove("example.com.")
-
-	s, addrstr, err := RunLocalUDPServer("127.0.0.1:0")
-	if err != nil {
-		t.Fatalf("unable to run test server: %v", err)
-	}
-	defer s.Shutdown()
-
-	c := new(Client)
-	m := new(Msg)
-	m.SetQuestion("miek.nl.", TypeTXT)
-	r, _, err := c.Exchange(m, addrstr)
-	if err != nil || len(r.Extra) == 0 {
-		t.Fatal("failed to exchange miek.nl", err)
-	}
-	txt := r.Extra[0].(*TXT).Txt[0]
-	if txt != "Hello world" {
-		t.Error("unexpected result for miek.nl", txt, "!= Hello world")
-	}
-
-	m.SetQuestion("example.com.", TypeTXT)
-	r, _, err = c.Exchange(m, addrstr)
-	if err != nil {
-		t.Fatal("failed to exchange example.com", err)
-	}
-	txt = r.Extra[0].(*TXT).Txt[0]
-	if txt != "Hello example" {
-		t.Error("unexpected result for example.com", txt, "!= Hello example")
-	}
-
-	// Test Mixes cased as noticed by Ask.
-	m.SetQuestion("eXaMplE.cOm.", TypeTXT)
-	r, _, err = c.Exchange(m, addrstr)
-	if err != nil {
-		t.Error("failed to exchange eXaMplE.cOm", err)
-	}
-	txt = r.Extra[0].(*TXT).Txt[0]
-	if txt != "Hello example" {
-		t.Error("unexpected result for example.com", txt, "!= Hello example")
-	}
-}
-
-func TestServingTLS(t *testing.T) {
-	HandleFunc("miek.nl.", HelloServer)
-	HandleFunc("example.com.", AnotherHelloServer)
-	defer HandleRemove("miek.nl.")
-	defer HandleRemove("example.com.")
-
-	cert, err := tls.X509KeyPair(CertPEMBlock, KeyPEMBlock)
-	if err != nil {
-		t.Fatalf("unable to build certificate: %v", err)
-	}
-
-	config := tls.Config{
-		Certificates: []tls.Certificate{cert},
-	}
-
-	s, addrstr, err := RunLocalTLSServer("127.0.0.1:0", &config)
-	if err != nil {
-		t.Fatalf("unable to run test server: %v", err)
-	}
-	defer s.Shutdown()
-
-	c := new(Client)
-	c.Net = "tcp-tls"
-	c.TLSConfig = &tls.Config{
-		InsecureSkipVerify: true,
-	}
-
-	m := new(Msg)
-	m.SetQuestion("miek.nl.", TypeTXT)
-	r, _, err := c.Exchange(m, addrstr)
-	if err != nil || len(r.Extra) == 0 {
-		t.Fatal("failed to exchange miek.nl", err)
-	}
-	txt := r.Extra[0].(*TXT).Txt[0]
-	if txt != "Hello world" {
-		t.Error("unexpected result for miek.nl", txt, "!= Hello world")
-	}
-
-	m.SetQuestion("example.com.", TypeTXT)
-	r, _, err = c.Exchange(m, addrstr)
-	if err != nil {
-		t.Fatal("failed to exchange example.com", err)
-	}
-	txt = r.Extra[0].(*TXT).Txt[0]
-	if txt != "Hello example" {
-		t.Error("unexpected result for example.com", txt, "!= Hello example")
-	}
-
-	// Test Mixes cased as noticed by Ask.
-	m.SetQuestion("eXaMplE.cOm.", TypeTXT)
-	r, _, err = c.Exchange(m, addrstr)
-	if err != nil {
-		t.Error("failed to exchange eXaMplE.cOm", err)
-	}
-	txt = r.Extra[0].(*TXT).Txt[0]
-	if txt != "Hello example" {
-		t.Error("unexpected result for example.com", txt, "!= Hello example")
-	}
-}
-
-func BenchmarkServe(b *testing.B) {
-	b.StopTimer()
-	HandleFunc("miek.nl.", HelloServer)
-	defer HandleRemove("miek.nl.")
-	a := runtime.GOMAXPROCS(4)
-
-	s, addrstr, err := RunLocalUDPServer("127.0.0.1:0")
-	if err != nil {
-		b.Fatalf("unable to run test server: %v", err)
-	}
-	defer s.Shutdown()
-
-	c := new(Client)
-	m := new(Msg)
-	m.SetQuestion("miek.nl", TypeSOA)
-
-	b.StartTimer()
-	for i := 0; i < b.N; i++ {
-		c.Exchange(m, addrstr)
-	}
-	runtime.GOMAXPROCS(a)
-}
-
-func benchmarkServe6(b *testing.B) {
-	b.StopTimer()
-	HandleFunc("miek.nl.", HelloServer)
-	defer HandleRemove("miek.nl.")
-	a := runtime.GOMAXPROCS(4)
-	s, addrstr, err := RunLocalUDPServer("[::1]:0")
-	if err != nil {
-		b.Fatalf("unable to run test server: %v", err)
-	}
-	defer s.Shutdown()
-
-	c := new(Client)
-	m := new(Msg)
-	m.SetQuestion("miek.nl", TypeSOA)
-
-	b.StartTimer()
-	for i := 0; i < b.N; i++ {
-		c.Exchange(m, addrstr)
-	}
-	runtime.GOMAXPROCS(a)
-}
-
-func HelloServerCompress(w ResponseWriter, req *Msg) {
-	m := new(Msg)
-	m.SetReply(req)
-	m.Extra = make([]RR, 1)
-	m.Extra[0] = &TXT{Hdr: RR_Header{Name: m.Question[0].Name, Rrtype: TypeTXT, Class: ClassINET, Ttl: 0}, Txt: []string{"Hello world"}}
-	m.Compress = true
-	w.WriteMsg(m)
-}
-
-func BenchmarkServeCompress(b *testing.B) {
-	b.StopTimer()
-	HandleFunc("miek.nl.", HelloServerCompress)
-	defer HandleRemove("miek.nl.")
-	a := runtime.GOMAXPROCS(4)
-	s, addrstr, err := RunLocalUDPServer("127.0.0.1:0")
-	if err != nil {
-		b.Fatalf("unable to run test server: %v", err)
-	}
-	defer s.Shutdown()
-
-	c := new(Client)
-	m := new(Msg)
-	m.SetQuestion("miek.nl", TypeSOA)
-	b.StartTimer()
-	for i := 0; i < b.N; i++ {
-		c.Exchange(m, addrstr)
-	}
-	runtime.GOMAXPROCS(a)
-}
-
-func TestDotAsCatchAllWildcard(t *testing.T) {
-	mux := NewServeMux()
-	mux.Handle(".", HandlerFunc(HelloServer))
-	mux.Handle("example.com.", HandlerFunc(AnotherHelloServer))
-
-	handler := mux.match("www.miek.nl.", TypeTXT)
-	if handler == nil {
-		t.Error("wildcard match failed")
-	}
-
-	handler = mux.match("www.example.com.", TypeTXT)
-	if handler == nil {
-		t.Error("example.com match failed")
-	}
-
-	handler = mux.match("a.www.example.com.", TypeTXT)
-	if handler == nil {
-		t.Error("a.www.example.com match failed")
-	}
-
-	handler = mux.match("boe.", TypeTXT)
-	if handler == nil {
-		t.Error("boe. match failed")
-	}
-}
-
-func TestCaseFolding(t *testing.T) {
-	mux := NewServeMux()
-	mux.Handle("_udp.example.com.", HandlerFunc(HelloServer))
-
-	handler := mux.match("_dns._udp.example.com.", TypeSRV)
-	if handler == nil {
-		t.Error("case sensitive characters folded")
-	}
-
-	handler = mux.match("_DNS._UDP.EXAMPLE.COM.", TypeSRV)
-	if handler == nil {
-		t.Error("case insensitive characters not folded")
-	}
-}
-
-func TestRootServer(t *testing.T) {
-	mux := NewServeMux()
-	mux.Handle(".", HandlerFunc(HelloServer))
-
-	handler := mux.match(".", TypeNS)
-	if handler == nil {
-		t.Error("root match failed")
-	}
-}
-
-type maxRec struct {
-	max int
-	sync.RWMutex
-}
-
-var M = new(maxRec)
-
-func HelloServerLargeResponse(resp ResponseWriter, req *Msg) {
-	m := new(Msg)
-	m.SetReply(req)
-	m.Authoritative = true
-	m1 := 0
-	M.RLock()
-	m1 = M.max
-	M.RUnlock()
-	for i := 0; i < m1; i++ {
-		aRec := &A{
-			Hdr: RR_Header{
-				Name:   req.Question[0].Name,
-				Rrtype: TypeA,
-				Class:  ClassINET,
-				Ttl:    0,
-			},
-			A: net.ParseIP(fmt.Sprintf("127.0.0.%d", i+1)).To4(),
-		}
-		m.Answer = append(m.Answer, aRec)
-	}
-	resp.WriteMsg(m)
-}
-
-func TestServingLargeResponses(t *testing.T) {
-	HandleFunc("example.", HelloServerLargeResponse)
-	defer HandleRemove("example.")
-
-	s, addrstr, err := RunLocalUDPServer("127.0.0.1:0")
-	if err != nil {
-		t.Fatalf("unable to run test server: %v", err)
-	}
-	defer s.Shutdown()
-
-	// Create request
-	m := new(Msg)
-	m.SetQuestion("web.service.example.", TypeANY)
-
-	c := new(Client)
-	c.Net = "udp"
-	M.Lock()
-	M.max = 2
-	M.Unlock()
-	_, _, err = c.Exchange(m, addrstr)
-	if err != nil {
-		t.Errorf("failed to exchange: %v", err)
-	}
-	// This must fail
-	M.Lock()
-	M.max = 20
-	M.Unlock()
-	_, _, err = c.Exchange(m, addrstr)
-	if err == nil {
-		t.Error("failed to fail exchange, this should generate packet error")
-	}
-	// But this must work again
-	c.UDPSize = 7000
-	_, _, err = c.Exchange(m, addrstr)
-	if err != nil {
-		t.Errorf("failed to exchange: %v", err)
-	}
-}
-
-func TestServingResponse(t *testing.T) {
-	if testing.Short() {
-		t.Skip("skipping test in short mode.")
-	}
-	HandleFunc("miek.nl.", HelloServer)
-	s, addrstr, err := RunLocalUDPServer("127.0.0.1:0")
-	if err != nil {
-		t.Fatalf("unable to run test server: %v", err)
-	}
-
-	c := new(Client)
-	m := new(Msg)
-	m.SetQuestion("miek.nl.", TypeTXT)
-	m.Response = false
-	_, _, err = c.Exchange(m, addrstr)
-	if err != nil {
-		t.Fatal("failed to exchange", err)
-	}
-	m.Response = true
-	_, _, err = c.Exchange(m, addrstr)
-	if err == nil {
-		t.Fatal("exchanged response message")
-	}
-
-	s.Shutdown()
-	s, addrstr, err = RunLocalUDPServerUnsafe("127.0.0.1:0")
-	if err != nil {
-		t.Fatalf("unable to run test server: %v", err)
-	}
-	defer s.Shutdown()
-
-	m.Response = true
-	_, _, err = c.Exchange(m, addrstr)
-	if err != nil {
-		t.Fatal("could exchanged response message in Unsafe mode")
-	}
-}
-
-func TestShutdownTCP(t *testing.T) {
-	s, _, err := RunLocalTCPServer("127.0.0.1:0")
-	if err != nil {
-		t.Fatalf("unable to run test server: %v", err)
-	}
-	err = s.Shutdown()
-	if err != nil {
-		t.Errorf("could not shutdown test TCP server, %v", err)
-	}
-}
-
-func TestShutdownTLS(t *testing.T) {
-	cert, err := tls.X509KeyPair(CertPEMBlock, KeyPEMBlock)
-	if err != nil {
-		t.Fatalf("unable to build certificate: %v", err)
-	}
-
-	config := tls.Config{
-		Certificates: []tls.Certificate{cert},
-	}
-
-	s, _, err := RunLocalTLSServer("127.0.0.1:0", &config)
-	if err != nil {
-		t.Fatalf("unable to run test server: %v", err)
-	}
-	err = s.Shutdown()
-	if err != nil {
-		t.Errorf("could not shutdown test TLS server, %v", err)
-	}
-}
-
-type trigger struct {
-	done bool
-	sync.RWMutex
-}
-
-func (t *trigger) Set() {
-	t.Lock()
-	defer t.Unlock()
-	t.done = true
-}
-func (t *trigger) Get() bool {
-	t.RLock()
-	defer t.RUnlock()
-	return t.done
-}
-
-func TestHandlerCloseTCP(t *testing.T) {
-
-	ln, err := net.Listen("tcp", "127.0.0.1:0")
-	if err != nil {
-		panic(err)
-	}
-	addr := ln.Addr().String()
-
-	server := &Server{Addr: addr, Net: "tcp", Listener: ln}
-
-	hname := "testhandlerclosetcp."
-	triggered := &trigger{}
-	HandleFunc(hname, func(w ResponseWriter, r *Msg) {
-		triggered.Set()
-		w.Close()
-	})
-	defer HandleRemove(hname)
-
-	go func() {
-		defer server.Shutdown()
-		c := &Client{Net: "tcp"}
-		m := new(Msg).SetQuestion(hname, 1)
-		tries := 0
-	exchange:
-		_, _, err := c.Exchange(m, addr)
-		if err != nil && err != io.EOF {
-			t.Logf("exchange failed: %s\n", err)
-			if tries == 3 {
-				return
-			}
-			time.Sleep(time.Second / 10)
-			tries += 1
-			goto exchange
-		}
-	}()
-	server.ActivateAndServe()
-	if !triggered.Get() {
-		t.Fatalf("handler never called")
-	}
-}
-
-func TestShutdownUDP(t *testing.T) {
-	s, _, fin, err := RunLocalUDPServerWithFinChan("127.0.0.1:0")
-	if err != nil {
-		t.Fatalf("unable to run test server: %v", err)
-	}
-	err = s.Shutdown()
-	if err != nil {
-		t.Errorf("could not shutdown test UDP server, %v", err)
-	}
-	select {
-	case <-fin:
-	case <-time.After(2 * time.Second):
-		t.Error("Could not shutdown test UDP server. Gave up waiting")
-	}
-}
-
-type ExampleFrameLengthWriter struct {
-	Writer
-}
-
-func (e *ExampleFrameLengthWriter) Write(m []byte) (int, error) {
-	fmt.Println("writing raw DNS message of length", len(m))
-	return e.Writer.Write(m)
-}
-
-func ExampleDecorateWriter() {
-	// instrument raw DNS message writing
-	wf := DecorateWriter(func(w Writer) Writer {
-		return &ExampleFrameLengthWriter{w}
-	})
-
-	// simple UDP server
-	pc, err := net.ListenPacket("udp", "127.0.0.1:0")
-	if err != nil {
-		fmt.Println(err.Error())
-		return
-	}
-	server := &Server{
-		PacketConn:     pc,
-		DecorateWriter: wf,
-		ReadTimeout:    time.Hour, WriteTimeout: time.Hour,
-	}
-
-	waitLock := sync.Mutex{}
-	waitLock.Lock()
-	server.NotifyStartedFunc = waitLock.Unlock
-	defer server.Shutdown()
-
-	go func() {
-		server.ActivateAndServe()
-		pc.Close()
-	}()
-
-	waitLock.Lock()
-
-	HandleFunc("miek.nl.", HelloServer)
-
-	c := new(Client)
-	m := new(Msg)
-	m.SetQuestion("miek.nl.", TypeTXT)
-	_, _, err = c.Exchange(m, pc.LocalAddr().String())
-	if err != nil {
-		fmt.Println("failed to exchange", err.Error())
-		return
-	}
-	// Output: writing raw DNS message of length 56
-}
-
-var (
-	// CertPEMBlock is a X509 data used to test TLS servers (used with tls.X509KeyPair)
-	CertPEMBlock = []byte(`-----BEGIN CERTIFICATE-----
-MIIDAzCCAeugAwIBAgIRAJFYMkcn+b8dpU15wjf++GgwDQYJKoZIhvcNAQELBQAw
-EjEQMA4GA1UEChMHQWNtZSBDbzAeFw0xNjAxMDgxMjAzNTNaFw0xNzAxMDcxMjAz
-NTNaMBIxEDAOBgNVBAoTB0FjbWUgQ28wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
-ggEKAoIBAQDXjqO6skvP03k58CNjQggd9G/mt+Wa+xRU+WXiKCCHttawM8x+slq5
-yfsHCwxlwsGn79HmJqecNqgHb2GWBXAvVVokFDTcC1hUP4+gp2gu9Ny27UHTjlLm
-O0l/xZ5MN8tfKyYlFw18tXu3fkaPyHj8v/D1RDkuo4ARdFvGSe8TqisbhLk2+9ow
-xfIGbEM9Fdiw8qByC2+d+FfvzIKz3GfQVwn0VoRom8L6NBIANq1IGrB5JefZB6nv
-DnfuxkBmY7F1513HKuEJ8KsLWWZWV9OPU4j4I4Rt+WJNlKjbD2srHxyrS2RDsr91
-8nCkNoWVNO3sZq0XkWKecdc921vL4ginAgMBAAGjVDBSMA4GA1UdDwEB/wQEAwIC
-pDATBgNVHSUEDDAKBggrBgEFBQcDATAPBgNVHRMBAf8EBTADAQH/MBoGA1UdEQQT
-MBGCCWxvY2FsaG9zdIcEfwAAATANBgkqhkiG9w0BAQsFAAOCAQEAGcU3iyLBIVZj
-aDzSvEDHUd1bnLBl1C58Xu/CyKlPqVU7mLfK0JcgEaYQTSX6fCJVNLbbCrcGLsPJ
-fbjlBbyeLjTV413fxPVuona62pBFjqdtbli2Qe8FRH2KBdm41JUJGdo+SdsFu7nc
-BFOcubdw6LLIXvsTvwndKcHWx1rMX709QU1Vn1GAIsbJV/DWI231Jyyb+lxAUx/C
-8vce5uVxiKcGS+g6OjsN3D3TtiEQGSXLh013W6Wsih8td8yMCMZ3w8LQ38br1GUe
-ahLIgUJ9l6HDguM17R7kGqxNvbElsMUHfTtXXP7UDQUiYXDakg8xDP6n9DCDhJ8Y
-bSt7OLB7NQ==
------END CERTIFICATE-----`)
-
-	// KeyPEMBlock is a X509 data used to test TLS servers (used with tls.X509KeyPair)
-	KeyPEMBlock = []byte(`-----BEGIN RSA PRIVATE KEY-----
-MIIEpQIBAAKCAQEA146jurJLz9N5OfAjY0IIHfRv5rflmvsUVPll4iggh7bWsDPM
-frJaucn7BwsMZcLBp+/R5iannDaoB29hlgVwL1VaJBQ03AtYVD+PoKdoLvTctu1B
-045S5jtJf8WeTDfLXysmJRcNfLV7t35Gj8h4/L/w9UQ5LqOAEXRbxknvE6orG4S5
-NvvaMMXyBmxDPRXYsPKgcgtvnfhX78yCs9xn0FcJ9FaEaJvC+jQSADatSBqweSXn
-2Qep7w537sZAZmOxdeddxyrhCfCrC1lmVlfTj1OI+COEbfliTZSo2w9rKx8cq0tk
-Q7K/dfJwpDaFlTTt7GatF5FinnHXPdtby+IIpwIDAQABAoIBAAJK4RDmPooqTJrC
-JA41MJLo+5uvjwCT9QZmVKAQHzByUFw1YNJkITTiognUI0CdzqNzmH7jIFs39ZeG
-proKusO2G6xQjrNcZ4cV2fgyb5g4QHStl0qhs94A+WojduiGm2IaumAgm6Mc5wDv
-ld6HmknN3Mku/ZCyanVFEIjOVn2WB7ZQLTBs6ZYaebTJG2Xv6p9t2YJW7pPQ9Xce
-s9ohAWohyM4X/OvfnfnLtQp2YLw/BxwehBsCR5SXM3ibTKpFNtxJC8hIfTuWtxZu
-2ywrmXShYBRB1WgtZt5k04bY/HFncvvcHK3YfI1+w4URKtwdaQgPUQRbVwDwuyBn
-flfkCJECgYEA/eWt01iEyE/lXkGn6V9lCocUU7lCU6yk5UT8VXVUc5If4KZKPfCk
-p4zJDOqwn2eM673aWz/mG9mtvAvmnugaGjcaVCyXOp/D/GDmKSoYcvW5B/yjfkLy
-dK6Yaa5LDRVYlYgyzcdCT5/9Qc626NzFwKCZNI4ncIU8g7ViATRxWJ8CgYEA2Ver
-vZ0M606sfgC0H3NtwNBxmuJ+lIF5LNp/wDi07lDfxRR1rnZMX5dnxjcpDr/zvm8J
-WtJJX3xMgqjtHuWKL3yKKony9J5ZPjichSbSbhrzfovgYIRZLxLLDy4MP9L3+CX/
-yBXnqMWuSnFX+M5fVGxdDWiYF3V+wmeOv9JvavkCgYEAiXAPDFzaY+R78O3xiu7M
-r0o3wqqCMPE/wav6O/hrYrQy9VSO08C0IM6g9pEEUwWmzuXSkZqhYWoQFb8Lc/GI
-T7CMXAxXQLDDUpbRgG79FR3Wr3AewHZU8LyiXHKwxcBMV4WGmsXGK3wbh8fyU1NO
-6NsGk+BvkQVOoK1LBAPzZ1kCgYEAsBSmD8U33T9s4dxiEYTrqyV0lH3g/SFz8ZHH
-pAyNEPI2iC1ONhyjPWKlcWHpAokiyOqeUpVBWnmSZtzC1qAydsxYB6ShT+sl9BHb
-RMix/QAauzBJhQhUVJ3OIys0Q1UBDmqCsjCE8SfOT4NKOUnA093C+YT+iyrmmktZ
-zDCJkckCgYEAndqM5KXGk5xYo+MAA1paZcbTUXwaWwjLU+XSRSSoyBEi5xMtfvUb
-7+a1OMhLwWbuz+pl64wFKrbSUyimMOYQpjVE/1vk/kb99pxbgol27hdKyTH1d+ov
-kFsxKCqxAnBVGEWAvVZAiiTOxleQFjz5RnL0BQp9Lg2cQe+dvuUmIAA=
------END RSA PRIVATE KEY-----`)
-)

+ 14 - 11
vendor/github.com/miekg/dns/sig0.go

@@ -5,6 +5,7 @@ import (
 	"crypto/dsa"
 	"crypto/dsa"
 	"crypto/ecdsa"
 	"crypto/ecdsa"
 	"crypto/rsa"
 	"crypto/rsa"
+	"encoding/binary"
 	"math/big"
 	"math/big"
 	"strings"
 	"strings"
 	"time"
 	"time"
@@ -67,13 +68,13 @@ func (rr *SIG) Sign(k crypto.Signer, m *Msg) ([]byte, error) {
 	}
 	}
 	// Adjust sig data length
 	// Adjust sig data length
 	rdoff := len(mbuf) + 1 + 2 + 2 + 4
 	rdoff := len(mbuf) + 1 + 2 + 2 + 4
-	rdlen, _ := unpackUint16(buf, rdoff)
+	rdlen := binary.BigEndian.Uint16(buf[rdoff:])
 	rdlen += uint16(len(sig))
 	rdlen += uint16(len(sig))
-	buf[rdoff], buf[rdoff+1] = packUint16(rdlen)
+	binary.BigEndian.PutUint16(buf[rdoff:], rdlen)
 	// Adjust additional count
 	// Adjust additional count
-	adc, _ := unpackUint16(buf, 10)
+	adc := binary.BigEndian.Uint16(buf[10:])
 	adc++
 	adc++
-	buf[10], buf[11] = packUint16(adc)
+	binary.BigEndian.PutUint16(buf[10:], adc)
 	return buf, nil
 	return buf, nil
 }
 }
 
 
@@ -103,10 +104,11 @@ func (rr *SIG) Verify(k *KEY, buf []byte) error {
 	hasher := hash.New()
 	hasher := hash.New()
 
 
 	buflen := len(buf)
 	buflen := len(buf)
-	qdc, _ := unpackUint16(buf, 4)
-	anc, _ := unpackUint16(buf, 6)
-	auc, _ := unpackUint16(buf, 8)
-	adc, offset := unpackUint16(buf, 10)
+	qdc := binary.BigEndian.Uint16(buf[4:])
+	anc := binary.BigEndian.Uint16(buf[6:])
+	auc := binary.BigEndian.Uint16(buf[8:])
+	adc := binary.BigEndian.Uint16(buf[10:])
+	offset := 12
 	var err error
 	var err error
 	for i := uint16(0); i < qdc && offset < buflen; i++ {
 	for i := uint16(0); i < qdc && offset < buflen; i++ {
 		_, offset, err = UnpackDomainName(buf, offset)
 		_, offset, err = UnpackDomainName(buf, offset)
@@ -127,7 +129,8 @@ func (rr *SIG) Verify(k *KEY, buf []byte) error {
 			continue
 			continue
 		}
 		}
 		var rdlen uint16
 		var rdlen uint16
-		rdlen, offset = unpackUint16(buf, offset)
+		rdlen = binary.BigEndian.Uint16(buf[offset:])
+		offset += 2
 		offset += int(rdlen)
 		offset += int(rdlen)
 	}
 	}
 	if offset >= buflen {
 	if offset >= buflen {
@@ -149,9 +152,9 @@ func (rr *SIG) Verify(k *KEY, buf []byte) error {
 	if offset+4+4 >= buflen {
 	if offset+4+4 >= buflen {
 		return &Error{err: "overflow unpacking signed message"}
 		return &Error{err: "overflow unpacking signed message"}
 	}
 	}
-	expire := uint32(buf[offset])<<24 | uint32(buf[offset+1])<<16 | uint32(buf[offset+2])<<8 | uint32(buf[offset+3])
+	expire := binary.BigEndian.Uint32(buf[offset:])
 	offset += 4
 	offset += 4
-	incept := uint32(buf[offset])<<24 | uint32(buf[offset+1])<<16 | uint32(buf[offset+2])<<8 | uint32(buf[offset+3])
+	incept := binary.BigEndian.Uint32(buf[offset:])
 	offset += 4
 	offset += 4
 	now := uint32(time.Now().Unix())
 	now := uint32(time.Now().Unix())
 	if now < incept || now > expire {
 	if now < incept || now > expire {

+ 0 - 89
vendor/github.com/miekg/dns/sig0_test.go

@@ -1,89 +0,0 @@
-package dns
-
-import (
-	"crypto"
-	"testing"
-	"time"
-)
-
-func TestSIG0(t *testing.T) {
-	if testing.Short() {
-		t.Skip("skipping test in short mode.")
-	}
-	m := new(Msg)
-	m.SetQuestion("example.org.", TypeSOA)
-	for _, alg := range []uint8{ECDSAP256SHA256, ECDSAP384SHA384, RSASHA1, RSASHA256, RSASHA512} {
-		algstr := AlgorithmToString[alg]
-		keyrr := new(KEY)
-		keyrr.Hdr.Name = algstr + "."
-		keyrr.Hdr.Rrtype = TypeKEY
-		keyrr.Hdr.Class = ClassINET
-		keyrr.Algorithm = alg
-		keysize := 1024
-		switch alg {
-		case ECDSAP256SHA256:
-			keysize = 256
-		case ECDSAP384SHA384:
-			keysize = 384
-		}
-		pk, err := keyrr.Generate(keysize)
-		if err != nil {
-			t.Errorf("failed to generate key for “%s”: %v", algstr, err)
-			continue
-		}
-		now := uint32(time.Now().Unix())
-		sigrr := new(SIG)
-		sigrr.Hdr.Name = "."
-		sigrr.Hdr.Rrtype = TypeSIG
-		sigrr.Hdr.Class = ClassANY
-		sigrr.Algorithm = alg
-		sigrr.Expiration = now + 300
-		sigrr.Inception = now - 300
-		sigrr.KeyTag = keyrr.KeyTag()
-		sigrr.SignerName = keyrr.Hdr.Name
-		mb, err := sigrr.Sign(pk.(crypto.Signer), m)
-		if err != nil {
-			t.Errorf("failed to sign message using “%s”: %v", algstr, err)
-			continue
-		}
-		m := new(Msg)
-		if err := m.Unpack(mb); err != nil {
-			t.Errorf("failed to unpack message signed using “%s”: %v", algstr, err)
-			continue
-		}
-		if len(m.Extra) != 1 {
-			t.Errorf("missing SIG for message signed using “%s”", algstr)
-			continue
-		}
-		var sigrrwire *SIG
-		switch rr := m.Extra[0].(type) {
-		case *SIG:
-			sigrrwire = rr
-		default:
-			t.Errorf("expected SIG RR, instead: %v", rr)
-			continue
-		}
-		for _, rr := range []*SIG{sigrr, sigrrwire} {
-			id := "sigrr"
-			if rr == sigrrwire {
-				id = "sigrrwire"
-			}
-			if err := rr.Verify(keyrr, mb); err != nil {
-				t.Errorf("failed to verify “%s” signed SIG(%s): %v", algstr, id, err)
-				continue
-			}
-		}
-		mb[13]++
-		if err := sigrr.Verify(keyrr, mb); err == nil {
-			t.Errorf("verify succeeded on an altered message using “%s”", algstr)
-			continue
-		}
-		sigrr.Expiration = 2
-		sigrr.Inception = 1
-		mb, _ = sigrr.Sign(pk.(crypto.Signer), m)
-		if err := sigrr.Verify(keyrr, mb); err == nil {
-			t.Errorf("verify succeeded on an expired message using “%s”", algstr)
-			continue
-		}
-	}
-}

+ 47 - 0
vendor/github.com/miekg/dns/smimea.go

@@ -0,0 +1,47 @@
+package dns
+
+import (
+	"crypto/sha256"
+	"crypto/x509"
+	"encoding/hex"
+)
+
+// Sign creates a SMIMEA record from an SSL certificate.
+func (r *SMIMEA) Sign(usage, selector, matchingType int, cert *x509.Certificate) (err error) {
+	r.Hdr.Rrtype = TypeSMIMEA
+	r.Usage = uint8(usage)
+	r.Selector = uint8(selector)
+	r.MatchingType = uint8(matchingType)
+
+	r.Certificate, err = CertificateToDANE(r.Selector, r.MatchingType, cert)
+	if err != nil {
+		return err
+	}
+	return nil
+}
+
+// Verify verifies a SMIMEA record against an SSL certificate. If it is OK
+// a nil error is returned.
+func (r *SMIMEA) Verify(cert *x509.Certificate) error {
+	c, err := CertificateToDANE(r.Selector, r.MatchingType, cert)
+	if err != nil {
+		return err // Not also ErrSig?
+	}
+	if r.Certificate == c {
+		return nil
+	}
+	return ErrSig // ErrSig, really?
+}
+
+// SIMEAName returns the ownername of a SMIMEA resource record as per the
+// format specified in RFC 'draft-ietf-dane-smime-12' Section 2 and 3
+func SMIMEAName(email_address string, domain_name string) (string, error) {
+	hasher := sha256.New()
+	hasher.Write([]byte(email_address))
+
+	// RFC Section 3: "The local-part is hashed using the SHA2-256
+	// algorithm with the hash truncated to 28 octets and
+	// represented in its hexadecimal representation to become the
+	// left-most label in the prepared domain name"
+	return hex.EncodeToString(hasher.Sum(nil)[:28]) + "." + "_smimecert." + domain_name, nil
+}

+ 3 - 42
vendor/github.com/miekg/dns/tlsa.go

@@ -1,50 +1,11 @@
 package dns
 package dns
 
 
 import (
 import (
-	"crypto/sha256"
-	"crypto/sha512"
 	"crypto/x509"
 	"crypto/x509"
-	"encoding/hex"
-	"errors"
-	"io"
 	"net"
 	"net"
 	"strconv"
 	"strconv"
 )
 )
 
 
-// CertificateToDANE converts a certificate to a hex string as used in the TLSA record.
-func CertificateToDANE(selector, matchingType uint8, cert *x509.Certificate) (string, error) {
-	switch matchingType {
-	case 0:
-		switch selector {
-		case 0:
-			return hex.EncodeToString(cert.Raw), nil
-		case 1:
-			return hex.EncodeToString(cert.RawSubjectPublicKeyInfo), nil
-		}
-	case 1:
-		h := sha256.New()
-		switch selector {
-		case 0:
-			io.WriteString(h, string(cert.Raw))
-			return hex.EncodeToString(h.Sum(nil)), nil
-		case 1:
-			io.WriteString(h, string(cert.RawSubjectPublicKeyInfo))
-			return hex.EncodeToString(h.Sum(nil)), nil
-		}
-	case 2:
-		h := sha512.New()
-		switch selector {
-		case 0:
-			io.WriteString(h, string(cert.Raw))
-			return hex.EncodeToString(h.Sum(nil)), nil
-		case 1:
-			io.WriteString(h, string(cert.RawSubjectPublicKeyInfo))
-			return hex.EncodeToString(h.Sum(nil)), nil
-		}
-	}
-	return "", errors.New("dns: bad TLSA MatchingType or TLSA Selector")
-}
-
 // Sign creates a TLSA record from an SSL certificate.
 // Sign creates a TLSA record from an SSL certificate.
 func (r *TLSA) Sign(usage, selector, matchingType int, cert *x509.Certificate) (err error) {
 func (r *TLSA) Sign(usage, selector, matchingType int, cert *x509.Certificate) (err error) {
 	r.Hdr.Rrtype = TypeTLSA
 	r.Hdr.Rrtype = TypeTLSA
@@ -78,9 +39,9 @@ func TLSAName(name, service, network string) (string, error) {
 	if !IsFqdn(name) {
 	if !IsFqdn(name) {
 		return "", ErrFqdn
 		return "", ErrFqdn
 	}
 	}
-	p, e := net.LookupPort(network, service)
-	if e != nil {
-		return "", e
+	p, err := net.LookupPort(network, service)
+	if err != nil {
+		return "", err
 	}
 	}
 	return "_" + strconv.Itoa(p) + "._" + network + "." + name, nil
 	return "_" + strconv.Itoa(p) + "._" + network + "." + name, nil
 }
 }

+ 107 - 43
vendor/github.com/miekg/dns/tsig.go

@@ -6,6 +6,7 @@ import (
 	"crypto/sha1"
 	"crypto/sha1"
 	"crypto/sha256"
 	"crypto/sha256"
 	"crypto/sha512"
 	"crypto/sha512"
+	"encoding/binary"
 	"encoding/hex"
 	"encoding/hex"
 	"hash"
 	"hash"
 	"io"
 	"io"
@@ -30,11 +31,11 @@ type TSIG struct {
 	TimeSigned uint64 `dns:"uint48"`
 	TimeSigned uint64 `dns:"uint48"`
 	Fudge      uint16
 	Fudge      uint16
 	MACSize    uint16
 	MACSize    uint16
-	MAC        string `dns:"size-hex"`
+	MAC        string `dns:"size-hex:MACSize"`
 	OrigId     uint16
 	OrigId     uint16
 	Error      uint16
 	Error      uint16
 	OtherLen   uint16
 	OtherLen   uint16
-	OtherData  string `dns:"size-hex"`
+	OtherData  string `dns:"size-hex:OtherLen"`
 }
 }
 
 
 // TSIG has no official presentation format, but this will suffice.
 // TSIG has no official presentation format, but this will suffice.
@@ -68,14 +69,13 @@ type tsigWireFmt struct {
 	// MACSize, MAC and OrigId excluded
 	// MACSize, MAC and OrigId excluded
 	Error     uint16
 	Error     uint16
 	OtherLen  uint16
 	OtherLen  uint16
-	OtherData string `dns:"size-hex"`
+	OtherData string `dns:"size-hex:OtherLen"`
 }
 }
 
 
-// If we have the MAC use this type to convert it to wiredata.
-// Section 3.4.3. Request MAC
+// If we have the MAC use this type to convert it to wiredata. Section 3.4.3. Request MAC
 type macWireFmt struct {
 type macWireFmt struct {
 	MACSize uint16
 	MACSize uint16
-	MAC     string `dns:"size-hex"`
+	MAC     string `dns:"size-hex:MACSize"`
 }
 }
 
 
 // 3.3. Time values used in TSIG calculations
 // 3.3. Time values used in TSIG calculations
@@ -141,7 +141,9 @@ func TsigGenerate(m *Msg, secret, requestMAC string, timersOnly bool) ([]byte, s
 		return nil, "", err
 		return nil, "", err
 	}
 	}
 	mbuf = append(mbuf, tbuf...)
 	mbuf = append(mbuf, tbuf...)
-	rawSetExtraLen(mbuf, uint16(len(m.Extra)+1))
+	// Update the ArCount directly in the buffer.
+	binary.BigEndian.PutUint16(mbuf[10:], uint16(len(m.Extra)+1))
+
 	return mbuf, t.MAC, nil
 	return mbuf, t.MAC, nil
 }
 }
 
 
@@ -212,7 +214,7 @@ func tsigBuffer(msgbuf []byte, rr *TSIG, requestMAC string, timersOnly bool) []b
 		m.MACSize = uint16(len(requestMAC) / 2)
 		m.MACSize = uint16(len(requestMAC) / 2)
 		m.MAC = requestMAC
 		m.MAC = requestMAC
 		buf = make([]byte, len(requestMAC)) // long enough
 		buf = make([]byte, len(requestMAC)) // long enough
-		n, _ := PackStruct(m, buf, 0)
+		n, _ := packMacWire(m, buf)
 		buf = buf[:n]
 		buf = buf[:n]
 	}
 	}
 
 
@@ -221,7 +223,7 @@ func tsigBuffer(msgbuf []byte, rr *TSIG, requestMAC string, timersOnly bool) []b
 		tsig := new(timerWireFmt)
 		tsig := new(timerWireFmt)
 		tsig.TimeSigned = rr.TimeSigned
 		tsig.TimeSigned = rr.TimeSigned
 		tsig.Fudge = rr.Fudge
 		tsig.Fudge = rr.Fudge
-		n, _ := PackStruct(tsig, tsigvar, 0)
+		n, _ := packTimerWire(tsig, tsigvar)
 		tsigvar = tsigvar[:n]
 		tsigvar = tsigvar[:n]
 	} else {
 	} else {
 		tsig := new(tsigWireFmt)
 		tsig := new(tsigWireFmt)
@@ -234,7 +236,7 @@ func tsigBuffer(msgbuf []byte, rr *TSIG, requestMAC string, timersOnly bool) []b
 		tsig.Error = rr.Error
 		tsig.Error = rr.Error
 		tsig.OtherLen = rr.OtherLen
 		tsig.OtherLen = rr.OtherLen
 		tsig.OtherData = rr.OtherData
 		tsig.OtherData = rr.OtherData
-		n, _ := PackStruct(tsig, tsigvar, 0)
+		n, _ := packTsigWire(tsig, tsigvar)
 		tsigvar = tsigvar[:n]
 		tsigvar = tsigvar[:n]
 	}
 	}
 
 
@@ -249,60 +251,54 @@ func tsigBuffer(msgbuf []byte, rr *TSIG, requestMAC string, timersOnly bool) []b
 
 
 // Strip the TSIG from the raw message.
 // Strip the TSIG from the raw message.
 func stripTsig(msg []byte) ([]byte, *TSIG, error) {
 func stripTsig(msg []byte) ([]byte, *TSIG, error) {
-	// Copied from msg.go's Unpack()
-	// Header.
-	var dh Header
-	var err error
-	dns := new(Msg)
-	rr := new(TSIG)
-	off := 0
-	tsigoff := 0
-	if off, err = UnpackStruct(&dh, msg, off); err != nil {
+	// Copied from msg.go's Unpack() Header, but modified.
+	var (
+		dh  Header
+		err error
+	)
+	off, tsigoff := 0, 0
+
+	if dh, off, err = unpackMsgHdr(msg, off); err != nil {
 		return nil, nil, err
 		return nil, nil, err
 	}
 	}
 	if dh.Arcount == 0 {
 	if dh.Arcount == 0 {
 		return nil, nil, ErrNoSig
 		return nil, nil, ErrNoSig
 	}
 	}
+
 	// Rcode, see msg.go Unpack()
 	// Rcode, see msg.go Unpack()
 	if int(dh.Bits&0xF) == RcodeNotAuth {
 	if int(dh.Bits&0xF) == RcodeNotAuth {
 		return nil, nil, ErrAuth
 		return nil, nil, ErrAuth
 	}
 	}
 
 
-	// Arrays.
-	dns.Question = make([]Question, dh.Qdcount)
-	dns.Answer = make([]RR, dh.Ancount)
-	dns.Ns = make([]RR, dh.Nscount)
-	dns.Extra = make([]RR, dh.Arcount)
-
-	for i := 0; i < len(dns.Question); i++ {
-		off, err = UnpackStruct(&dns.Question[i], msg, off)
+	for i := 0; i < int(dh.Qdcount); i++ {
+		_, off, err = unpackQuestion(msg, off)
 		if err != nil {
 		if err != nil {
 			return nil, nil, err
 			return nil, nil, err
 		}
 		}
 	}
 	}
-	for i := 0; i < len(dns.Answer); i++ {
-		dns.Answer[i], off, err = UnpackRR(msg, off)
-		if err != nil {
-			return nil, nil, err
-		}
+
+	_, off, err = unpackRRslice(int(dh.Ancount), msg, off)
+	if err != nil {
+		return nil, nil, err
 	}
 	}
-	for i := 0; i < len(dns.Ns); i++ {
-		dns.Ns[i], off, err = UnpackRR(msg, off)
-		if err != nil {
-			return nil, nil, err
-		}
+	_, off, err = unpackRRslice(int(dh.Nscount), msg, off)
+	if err != nil {
+		return nil, nil, err
 	}
 	}
-	for i := 0; i < len(dns.Extra); i++ {
+
+	rr := new(TSIG)
+	var extra RR
+	for i := 0; i < int(dh.Arcount); i++ {
 		tsigoff = off
 		tsigoff = off
-		dns.Extra[i], off, err = UnpackRR(msg, off)
+		extra, off, err = UnpackRR(msg, off)
 		if err != nil {
 		if err != nil {
 			return nil, nil, err
 			return nil, nil, err
 		}
 		}
-		if dns.Extra[i].Header().Rrtype == TypeTSIG {
-			rr = dns.Extra[i].(*TSIG)
+		if extra.Header().Rrtype == TypeTSIG {
+			rr = extra.(*TSIG)
 			// Adjust Arcount.
 			// Adjust Arcount.
-			arcount, _ := unpackUint16(msg, 10)
-			msg[10], msg[11] = packUint16(arcount - 1)
+			arcount := binary.BigEndian.Uint16(msg[10:])
+			binary.BigEndian.PutUint16(msg[10:], arcount-1)
 			break
 			break
 		}
 		}
 	}
 	}
@@ -318,3 +314,71 @@ func tsigTimeToString(t uint64) string {
 	ti := time.Unix(int64(t), 0).UTC()
 	ti := time.Unix(int64(t), 0).UTC()
 	return ti.Format("20060102150405")
 	return ti.Format("20060102150405")
 }
 }
+
+func packTsigWire(tw *tsigWireFmt, msg []byte) (int, error) {
+	// copied from zmsg.go TSIG packing
+	// RR_Header
+	off, err := PackDomainName(tw.Name, msg, 0, nil, false)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint16(tw.Class, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint32(tw.Ttl, msg, off)
+	if err != nil {
+		return off, err
+	}
+
+	off, err = PackDomainName(tw.Algorithm, msg, off, nil, false)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint48(tw.TimeSigned, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint16(tw.Fudge, msg, off)
+	if err != nil {
+		return off, err
+	}
+
+	off, err = packUint16(tw.Error, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint16(tw.OtherLen, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packStringHex(tw.OtherData, msg, off)
+	if err != nil {
+		return off, err
+	}
+	return off, nil
+}
+
+func packMacWire(mw *macWireFmt, msg []byte) (int, error) {
+	off, err := packUint16(mw.MACSize, msg, 0)
+	if err != nil {
+		return off, err
+	}
+	off, err = packStringHex(mw.MAC, msg, off)
+	if err != nil {
+		return off, err
+	}
+	return off, nil
+}
+
+func packTimerWire(tw *timerWireFmt, msg []byte) (int, error) {
+	off, err := packUint48(tw.TimeSigned, msg, 0)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint16(tw.Fudge, msg, off)
+	if err != nil {
+		return off, err
+	}
+	return off, nil
+}

+ 0 - 37
vendor/github.com/miekg/dns/tsig_test.go

@@ -1,37 +0,0 @@
-package dns
-
-import (
-	"testing"
-	"time"
-)
-
-func newTsig(algo string) *Msg {
-	m := new(Msg)
-	m.SetQuestion("example.org.", TypeA)
-	m.SetTsig("example.", algo, 300, time.Now().Unix())
-	return m
-}
-
-func TestTsig(t *testing.T) {
-	m := newTsig(HmacMD5)
-	buf, _, err := TsigGenerate(m, "pRZgBrBvI4NAHZYhxmhs/Q==", "", false)
-	if err != nil {
-		t.Fatal(err)
-	}
-	err = TsigVerify(buf, "pRZgBrBvI4NAHZYhxmhs/Q==", "", false)
-	if err != nil {
-		t.Fatal(err)
-	}
-}
-
-func TestTsigCase(t *testing.T) {
-	m := newTsig("HmAc-mD5.sig-ALg.rEg.int.") // HmacMD5
-	buf, _, err := TsigGenerate(m, "pRZgBrBvI4NAHZYhxmhs/Q==", "", false)
-	if err != nil {
-		t.Fatal(err)
-	}
-	err = TsigVerify(buf, "pRZgBrBvI4NAHZYhxmhs/Q==", "", false)
-	if err != nil {
-		t.Fatal(err)
-	}
-}

+ 55 - 89
vendor/github.com/miekg/dns/types.go

@@ -1,7 +1,6 @@
 package dns
 package dns
 
 
 import (
 import (
-	"encoding/base64"
 	"fmt"
 	"fmt"
 	"net"
 	"net"
 	"strconv"
 	"strconv"
@@ -35,7 +34,6 @@ const (
 	TypeMG         uint16 = 8
 	TypeMG         uint16 = 8
 	TypeMR         uint16 = 9
 	TypeMR         uint16 = 9
 	TypeNULL       uint16 = 10
 	TypeNULL       uint16 = 10
-	TypeWKS        uint16 = 11
 	TypePTR        uint16 = 12
 	TypePTR        uint16 = 12
 	TypeHINFO      uint16 = 13
 	TypeHINFO      uint16 = 13
 	TypeMINFO      uint16 = 14
 	TypeMINFO      uint16 = 14
@@ -65,7 +63,6 @@ const (
 	TypeOPT        uint16 = 41 // EDNS
 	TypeOPT        uint16 = 41 // EDNS
 	TypeDS         uint16 = 43
 	TypeDS         uint16 = 43
 	TypeSSHFP      uint16 = 44
 	TypeSSHFP      uint16 = 44
-	TypeIPSECKEY   uint16 = 45
 	TypeRRSIG      uint16 = 46
 	TypeRRSIG      uint16 = 46
 	TypeNSEC       uint16 = 47
 	TypeNSEC       uint16 = 47
 	TypeDNSKEY     uint16 = 48
 	TypeDNSKEY     uint16 = 48
@@ -73,6 +70,7 @@ const (
 	TypeNSEC3      uint16 = 50
 	TypeNSEC3      uint16 = 50
 	TypeNSEC3PARAM uint16 = 51
 	TypeNSEC3PARAM uint16 = 51
 	TypeTLSA       uint16 = 52
 	TypeTLSA       uint16 = 52
+	TypeSMIMEA     uint16 = 53
 	TypeHIP        uint16 = 55
 	TypeHIP        uint16 = 55
 	TypeNINFO      uint16 = 56
 	TypeNINFO      uint16 = 56
 	TypeRKEY       uint16 = 57
 	TypeRKEY       uint16 = 57
@@ -136,6 +134,7 @@ const (
 	RcodeBadName        = 20
 	RcodeBadName        = 20
 	RcodeBadAlg         = 21
 	RcodeBadAlg         = 21
 	RcodeBadTrunc       = 22 // TSIG
 	RcodeBadTrunc       = 22 // TSIG
+	RcodeBadCookie      = 23 // DNS Cookies
 
 
 	// Message Opcodes. There is no 3.
 	// Message Opcodes. There is no 3.
 	OpcodeQuery  = 0
 	OpcodeQuery  = 0
@@ -871,57 +870,6 @@ func (rr *SSHFP) String() string {
 		" " + strings.ToUpper(rr.FingerPrint)
 		" " + strings.ToUpper(rr.FingerPrint)
 }
 }
 
 
-type IPSECKEY struct {
-	Hdr        RR_Header
-	Precedence uint8
-	// GatewayType: 1: A record, 2: AAAA record, 3: domainname.
-	// 0 is use for no type and GatewayName should be "." then.
-	GatewayType uint8
-	Algorithm   uint8
-	// Gateway can be an A record, AAAA record or a domain name.
-	GatewayA    net.IP `dns:"a"`
-	GatewayAAAA net.IP `dns:"aaaa"`
-	GatewayName string `dns:"domain-name"`
-	PublicKey   string `dns:"base64"`
-}
-
-func (rr *IPSECKEY) String() string {
-	s := rr.Hdr.String() + strconv.Itoa(int(rr.Precedence)) +
-		" " + strconv.Itoa(int(rr.GatewayType)) +
-		" " + strconv.Itoa(int(rr.Algorithm))
-	switch rr.GatewayType {
-	case 0:
-		fallthrough
-	case 3:
-		s += " " + rr.GatewayName
-	case 1:
-		s += " " + rr.GatewayA.String()
-	case 2:
-		s += " " + rr.GatewayAAAA.String()
-	default:
-		s += " ."
-	}
-	s += " " + rr.PublicKey
-	return s
-}
-
-func (rr *IPSECKEY) len() int {
-	l := rr.Hdr.len() + 3 + 1
-	switch rr.GatewayType {
-	default:
-		fallthrough
-	case 0:
-		fallthrough
-	case 3:
-		l += len(rr.GatewayName)
-	case 1:
-		l += 4
-	case 2:
-		l += 16
-	}
-	return l + base64.StdEncoding.DecodedLen(len(rr.PublicKey))
-}
-
 type KEY struct {
 type KEY struct {
 	DNSKEY
 	DNSKEY
 }
 }
@@ -973,9 +921,9 @@ type NSEC3 struct {
 	Flags      uint8
 	Flags      uint8
 	Iterations uint16
 	Iterations uint16
 	SaltLength uint8
 	SaltLength uint8
-	Salt       string `dns:"size-hex"`
+	Salt       string `dns:"size-hex:SaltLength"`
 	HashLength uint8
 	HashLength uint8
-	NextDomain string   `dns:"size-base32"`
+	NextDomain string   `dns:"size-base32:HashLength"`
 	TypeBitMap []uint16 `dns:"nsec"`
 	TypeBitMap []uint16 `dns:"nsec"`
 }
 }
 
 
@@ -1011,7 +959,7 @@ type NSEC3PARAM struct {
 	Flags      uint8
 	Flags      uint8
 	Iterations uint16
 	Iterations uint16
 	SaltLength uint8
 	SaltLength uint8
-	Salt       string `dns:"hex"`
+	Salt       string `dns:"size-hex:SaltLength"`
 }
 }
 
 
 func (rr *NSEC3PARAM) String() string {
 func (rr *NSEC3PARAM) String() string {
@@ -1100,13 +1048,35 @@ func (rr *TLSA) String() string {
 		" " + rr.Certificate
 		" " + rr.Certificate
 }
 }
 
 
+type SMIMEA struct {
+	Hdr          RR_Header
+	Usage        uint8
+	Selector     uint8
+	MatchingType uint8
+	Certificate  string `dns:"hex"`
+}
+
+func (rr *SMIMEA) String() string {
+	s := rr.Hdr.String() +
+		strconv.Itoa(int(rr.Usage)) +
+		" " + strconv.Itoa(int(rr.Selector)) +
+		" " + strconv.Itoa(int(rr.MatchingType))
+
+	// Every Nth char needs a space on this output. If we output
+	// this as one giant line, we can't read it can in because in some cases
+	// the cert length overflows scan.maxTok (2048).
+	sx := splitN(rr.Certificate, 1024) // conservative value here
+	s += " " + strings.Join(sx, " ")
+	return s
+}
+
 type HIP struct {
 type HIP struct {
 	Hdr                RR_Header
 	Hdr                RR_Header
 	HitLength          uint8
 	HitLength          uint8
 	PublicKeyAlgorithm uint8
 	PublicKeyAlgorithm uint8
 	PublicKeyLength    uint16
 	PublicKeyLength    uint16
-	Hit                string   `dns:"hex"`
-	PublicKey          string   `dns:"base64"`
+	Hit                string   `dns:"size-hex:HitLength"`
+	PublicKey          string   `dns:"size-base64:PublicKeyLength"`
 	RendezvousServers  []string `dns:"domain-name"`
 	RendezvousServers  []string `dns:"domain-name"`
 }
 }
 
 
@@ -1128,31 +1098,6 @@ type NINFO struct {
 
 
 func (rr *NINFO) String() string { return rr.Hdr.String() + sprintTxt(rr.ZSData) }
 func (rr *NINFO) String() string { return rr.Hdr.String() + sprintTxt(rr.ZSData) }
 
 
-type WKS struct {
-	Hdr      RR_Header
-	Address  net.IP `dns:"a"`
-	Protocol uint8
-	BitMap   []uint16 `dns:"wks"`
-}
-
-func (rr *WKS) len() int {
-	// TODO: this is missing something...
-	return rr.Hdr.len() + net.IPv4len + 1
-}
-
-func (rr *WKS) String() (s string) {
-	s = rr.Hdr.String()
-	if rr.Address != nil {
-		s += rr.Address.String()
-	}
-	// TODO(miek): missing protocol here, see /etc/protocols
-	for i := 0; i < len(rr.BitMap); i++ {
-		// should lookup the port
-		s += " " + strconv.Itoa(int(rr.BitMap[i]))
-	}
-	return s
-}
-
 type NID struct {
 type NID struct {
 	Hdr        RR_Header
 	Hdr        RR_Header
 	Preference uint16
 	Preference uint16
@@ -1286,9 +1231,9 @@ func TimeToString(t uint32) string {
 // string values like "20110403154150" to an 32 bit integer.
 // string values like "20110403154150" to an 32 bit integer.
 // It takes serial arithmetic (RFC 1982) into account.
 // It takes serial arithmetic (RFC 1982) into account.
 func StringToTime(s string) (uint32, error) {
 func StringToTime(s string) (uint32, error) {
-	t, e := time.Parse("20060102150405", s)
-	if e != nil {
-		return 0, e
+	t, err := time.Parse("20060102150405", s)
+	if err != nil {
+		return 0, err
 	}
 	}
 	mod := (t.Unix() / year68) - 1
 	mod := (t.Unix() / year68) - 1
 	if mod < 0 {
 	if mod < 0 {
@@ -1297,8 +1242,7 @@ func StringToTime(s string) (uint32, error) {
 	return uint32(t.Unix() - (mod * year68)), nil
 	return uint32(t.Unix() - (mod * year68)), nil
 }
 }
 
 
-// saltToString converts a NSECX salt to uppercase and
-// returns "-" when it is empty
+// saltToString converts a NSECX salt to uppercase and returns "-" when it is empty.
 func saltToString(s string) string {
 func saltToString(s string) string {
 	if len(s) == 0 {
 	if len(s) == 0 {
 		return "-"
 		return "-"
@@ -1326,3 +1270,25 @@ func copyIP(ip net.IP) net.IP {
 	copy(p, ip)
 	copy(p, ip)
 	return p
 	return p
 }
 }
+
+// SplitN splits a string into N sized string chunks.
+// This might become an exported function once.
+func splitN(s string, n int) []string {
+	if len(s) < n {
+		return []string{s}
+	}
+	sx := []string{}
+	p, i := 0, n
+	for {
+		if i <= len(s) {
+			sx = append(sx, s[p:i])
+		} else {
+			sx = append(sx, s[p:])
+			break
+
+		}
+		p, i = p+n, i+n
+	}
+
+	return sx
+}

+ 23 - 18
vendor/github.com/miekg/dns/types_generate.go

@@ -20,16 +20,14 @@ import (
 )
 )
 
 
 var skipLen = map[string]struct{}{
 var skipLen = map[string]struct{}{
-	"NSEC":     {},
-	"NSEC3":    {},
-	"OPT":      {},
-	"WKS":      {},
-	"IPSECKEY": {},
+	"NSEC":  {},
+	"NSEC3": {},
+	"OPT":   {},
 }
 }
 
 
 var packageHdr = `
 var packageHdr = `
 // *** DO NOT MODIFY ***
 // *** DO NOT MODIFY ***
-// AUTOGENERATED BY go generate
+// AUTOGENERATED BY go generate from type_generate.go
 
 
 package dns
 package dns
 
 
@@ -173,26 +171,30 @@ func main() {
 				continue
 				continue
 			}
 			}
 
 
-			switch st.Tag(i) {
-			case `dns:"-"`:
+			switch {
+			case st.Tag(i) == `dns:"-"`:
 				// ignored
 				// ignored
-			case `dns:"cdomain-name"`, `dns:"domain-name"`:
+			case st.Tag(i) == `dns:"cdomain-name"`, st.Tag(i) == `dns:"domain-name"`:
 				o("l += len(rr.%s) + 1\n")
 				o("l += len(rr.%s) + 1\n")
-			case `dns:"octet"`:
+			case st.Tag(i) == `dns:"octet"`:
 				o("l += len(rr.%s)\n")
 				o("l += len(rr.%s)\n")
-			case `dns:"base64"`:
+			case strings.HasPrefix(st.Tag(i), `dns:"size-base64`):
+				fallthrough
+			case st.Tag(i) == `dns:"base64"`:
 				o("l += base64.StdEncoding.DecodedLen(len(rr.%s))\n")
 				o("l += base64.StdEncoding.DecodedLen(len(rr.%s))\n")
-			case `dns:"size-hex"`, `dns:"hex"`:
+			case strings.HasPrefix(st.Tag(i), `dns:"size-hex`):
+				fallthrough
+			case st.Tag(i) == `dns:"hex"`:
 				o("l += len(rr.%s)/2 + 1\n")
 				o("l += len(rr.%s)/2 + 1\n")
-			case `dns:"a"`:
+			case st.Tag(i) == `dns:"a"`:
 				o("l += net.IPv4len // %s\n")
 				o("l += net.IPv4len // %s\n")
-			case `dns:"aaaa"`:
+			case st.Tag(i) == `dns:"aaaa"`:
 				o("l += net.IPv6len // %s\n")
 				o("l += net.IPv6len // %s\n")
-			case `dns:"txt"`:
+			case st.Tag(i) == `dns:"txt"`:
 				o("for _, t := range rr.%s { l += len(t) + 1 }\n")
 				o("for _, t := range rr.%s { l += len(t) + 1 }\n")
-			case `dns:"uint48"`:
+			case st.Tag(i) == `dns:"uint48"`:
 				o("l += 6 // %s\n")
 				o("l += 6 // %s\n")
-			case "":
+			case st.Tag(i) == "":
 				switch st.Field(i).Type().(*types.Basic).Kind() {
 				switch st.Field(i).Type().(*types.Basic).Kind() {
 				case types.Uint8:
 				case types.Uint8:
 					o("l += 1 // %s\n")
 					o("l += 1 // %s\n")
@@ -229,7 +231,10 @@ func main() {
 			if sl, ok := st.Field(i).Type().(*types.Slice); ok {
 			if sl, ok := st.Field(i).Type().(*types.Slice); ok {
 				t := sl.Underlying().String()
 				t := sl.Underlying().String()
 				t = strings.TrimPrefix(t, "[]")
 				t = strings.TrimPrefix(t, "[]")
-				t = strings.TrimPrefix(t, "github.com/miekg/dns.")
+				if strings.Contains(t, ".") {
+					splits := strings.Split(t, ".")
+					t = splits[len(splits)-1]
+				}
 				fmt.Fprintf(b, "%s := make([]%s, len(rr.%s)); copy(%s, rr.%s)\n",
 				fmt.Fprintf(b, "%s := make([]%s, len(rr.%s)); copy(%s, rr.%s)\n",
 					f, t, f, f, f)
 					f, t, f, f, f)
 				fields = append(fields, f)
 				fields = append(fields, f)

+ 0 - 42
vendor/github.com/miekg/dns/types_test.go

@@ -1,42 +0,0 @@
-package dns
-
-import (
-	"testing"
-)
-
-func TestCmToM(t *testing.T) {
-	s := cmToM(0, 0)
-	if s != "0.00" {
-		t.Error("0, 0")
-	}
-
-	s = cmToM(1, 0)
-	if s != "0.01" {
-		t.Error("1, 0")
-	}
-
-	s = cmToM(3, 1)
-	if s != "0.30" {
-		t.Error("3, 1")
-	}
-
-	s = cmToM(4, 2)
-	if s != "4" {
-		t.Error("4, 2")
-	}
-
-	s = cmToM(5, 3)
-	if s != "50" {
-		t.Error("5, 3")
-	}
-
-	s = cmToM(7, 5)
-	if s != "7000" {
-		t.Error("7, 5")
-	}
-
-	s = cmToM(9, 9)
-	if s != "90000000" {
-		t.Error("9, 9")
-	}
-}

+ 1 - 1
vendor/github.com/miekg/dns/udp.go

@@ -1,4 +1,4 @@
-// +build !windows
+// +build !windows,!plan9
 
 
 package dns
 package dns
 
 

+ 1 - 1
vendor/github.com/miekg/dns/udp_other.go

@@ -1,4 +1,4 @@
-// +build !linux
+// +build !linux,!plan9
 
 
 package dns
 package dns
 
 

+ 34 - 0
vendor/github.com/miekg/dns/udp_plan9.go

@@ -0,0 +1,34 @@
+package dns
+
+import (
+	"net"
+)
+
+func setUDPSocketOptions(conn *net.UDPConn) error { return nil }
+
+// SessionUDP holds the remote address and the associated
+// out-of-band data.
+type SessionUDP struct {
+	raddr   *net.UDPAddr
+	context []byte
+}
+
+// RemoteAddr returns the remote network address.
+func (s *SessionUDP) RemoteAddr() net.Addr { return s.raddr }
+
+// ReadFromSessionUDP acts just like net.UDPConn.ReadFrom(), but returns a session object instead of a
+// net.UDPAddr.
+func ReadFromSessionUDP(conn *net.UDPConn, b []byte) (int, *SessionUDP, error) {
+	oob := make([]byte, 40)
+	n, oobn, _, raddr, err := conn.ReadMsgUDP(b, oob)
+	if err != nil {
+		return n, nil, err
+	}
+	return n, &SessionUDP{raddr, oob[:oobn]}, err
+}
+
+// WriteToSessionUDP acts just like net.UDPConn.WritetTo(), but uses a *SessionUDP instead of a net.Addr.
+func WriteToSessionUDP(conn *net.UDPConn, b []byte, session *SessionUDP) (int, error) {
+	n, _, err := conn.WriteMsgUDP(b, session.context, session.raddr)
+	return n, err
+}

+ 0 - 145
vendor/github.com/miekg/dns/update_test.go

@@ -1,145 +0,0 @@
-package dns
-
-import (
-	"bytes"
-	"testing"
-)
-
-func TestDynamicUpdateParsing(t *testing.T) {
-	prefix := "example.com. IN "
-	for _, typ := range TypeToString {
-		if typ == "OPT" || typ == "AXFR" || typ == "IXFR" || typ == "ANY" || typ == "TKEY" ||
-			typ == "TSIG" || typ == "ISDN" || typ == "UNSPEC" || typ == "NULL" || typ == "ATMA" ||
-			typ == "Reserved" || typ == "None" || typ == "NXT" || typ == "MAILB" || typ == "MAILA" {
-			continue
-		}
-		r, err := NewRR(prefix + typ)
-		if err != nil {
-			t.Errorf("failure to parse: %s %s: %v", prefix, typ, err)
-		} else {
-			t.Logf("parsed: %s", r.String())
-		}
-	}
-}
-
-func TestDynamicUpdateUnpack(t *testing.T) {
-	// From https://github.com/miekg/dns/issues/150#issuecomment-62296803
-	// It should be an update message for the zone "example.",
-	// deleting the A RRset "example." and then adding an A record at "example.".
-	// class ANY, TYPE A
-	buf := []byte{171, 68, 40, 0, 0, 1, 0, 0, 0, 2, 0, 0, 7, 101, 120, 97, 109, 112, 108, 101, 0, 0, 6, 0, 1, 192, 12, 0, 1, 0, 255, 0, 0, 0, 0, 0, 0, 192, 12, 0, 1, 0, 1, 0, 0, 0, 0, 0, 4, 127, 0, 0, 1}
-	msg := new(Msg)
-	err := msg.Unpack(buf)
-	if err != nil {
-		t.Errorf("failed to unpack: %v\n%s", err, msg.String())
-	}
-}
-
-func TestDynamicUpdateZeroRdataUnpack(t *testing.T) {
-	m := new(Msg)
-	rr := &RR_Header{Name: ".", Rrtype: 0, Class: 1, Ttl: ^uint32(0), Rdlength: 0}
-	m.Answer = []RR{rr, rr, rr, rr, rr}
-	m.Ns = m.Answer
-	for n, s := range TypeToString {
-		rr.Rrtype = n
-		bytes, err := m.Pack()
-		if err != nil {
-			t.Errorf("failed to pack %s: %v", s, err)
-			continue
-		}
-		if err := new(Msg).Unpack(bytes); err != nil {
-			t.Errorf("failed to unpack %s: %v", s, err)
-		}
-	}
-}
-
-func TestRemoveRRset(t *testing.T) {
-	// Should add a zero data RR in Class ANY with a TTL of 0
-	// for each set mentioned in the RRs provided to it.
-	rr, err := NewRR(". 100 IN A 127.0.0.1")
-	if err != nil {
-		t.Fatalf("error constructing RR: %v", err)
-	}
-	m := new(Msg)
-	m.Ns = []RR{&RR_Header{Name: ".", Rrtype: TypeA, Class: ClassANY, Ttl: 0, Rdlength: 0}}
-	expectstr := m.String()
-	expect, err := m.Pack()
-	if err != nil {
-		t.Fatalf("error packing expected msg: %v", err)
-	}
-
-	m.Ns = nil
-	m.RemoveRRset([]RR{rr})
-	actual, err := m.Pack()
-	if err != nil {
-		t.Fatalf("error packing actual msg: %v", err)
-	}
-	if !bytes.Equal(actual, expect) {
-		tmp := new(Msg)
-		if err := tmp.Unpack(actual); err != nil {
-			t.Fatalf("error unpacking actual msg: %v", err)
-		}
-		t.Errorf("expected msg:\n%s", expectstr)
-		t.Errorf("actual msg:\n%v", tmp)
-	}
-}
-
-func TestPreReqAndRemovals(t *testing.T) {
-	// Build a list of multiple prereqs and then somes removes followed by an insert.
-	// We should be able to add multiple prereqs and updates.
-	m := new(Msg)
-	m.SetUpdate("example.org.")
-	m.Id = 1234
-
-	// Use a full set of RRs each time, so we are sure the rdata is stripped.
-	rr_name1, _ := NewRR("name_used. 3600 IN A 127.0.0.1")
-	rr_name2, _ := NewRR("name_not_used. 3600 IN A 127.0.0.1")
-	rr_remove1, _ := NewRR("remove1. 3600 IN A 127.0.0.1")
-	rr_remove2, _ := NewRR("remove2. 3600 IN A 127.0.0.1")
-	rr_remove3, _ := NewRR("remove3. 3600 IN A 127.0.0.1")
-	rr_insert, _ := NewRR("insert. 3600 IN A 127.0.0.1")
-	rr_rrset1, _ := NewRR("rrset_used1. 3600 IN A 127.0.0.1")
-	rr_rrset2, _ := NewRR("rrset_used2. 3600 IN A 127.0.0.1")
-	rr_rrset3, _ := NewRR("rrset_not_used. 3600 IN A 127.0.0.1")
-
-	// Handle the prereqs.
-	m.NameUsed([]RR{rr_name1})
-	m.NameNotUsed([]RR{rr_name2})
-	m.RRsetUsed([]RR{rr_rrset1})
-	m.Used([]RR{rr_rrset2})
-	m.RRsetNotUsed([]RR{rr_rrset3})
-
-	// and now the updates.
-	m.RemoveName([]RR{rr_remove1})
-	m.RemoveRRset([]RR{rr_remove2})
-	m.Remove([]RR{rr_remove3})
-	m.Insert([]RR{rr_insert})
-
-	// This test function isn't a Example function because we print these RR with tabs at the
-	// end and the Example function trim these, thus they never match.
-	// TODO(miek): don't print these tabs and make this into an Example function.
-	expect := `;; opcode: UPDATE, status: NOERROR, id: 1234
-;; flags:; QUERY: 1, ANSWER: 5, AUTHORITY: 4, ADDITIONAL: 0
-
-;; QUESTION SECTION:
-;example.org.	IN	 SOA
-
-;; ANSWER SECTION:
-name_used.	0	ANY	ANY	
-name_not_used.	0	NONE	ANY	
-rrset_used1.	0	ANY	A	
-rrset_used2.	3600	IN	A	127.0.0.1
-rrset_not_used.	0	NONE	A	
-
-;; AUTHORITY SECTION:
-remove1.	0	ANY	ANY	
-remove2.	0	ANY	A	
-remove3.	0	NONE	A	127.0.0.1
-insert.	3600	IN	A	127.0.0.1
-`
-
-	if m.String() != expect {
-		t.Errorf("expected msg:\n%s", expect)
-		t.Errorf("actual msg:\n%v", m.String())
-	}
-}

+ 2 - 2
vendor/github.com/miekg/dns/xfr.go

@@ -162,8 +162,8 @@ func (t *Transfer) inIxfr(id uint16, c chan *Envelope) {
 //
 //
 //	ch := make(chan *dns.Envelope)
 //	ch := make(chan *dns.Envelope)
 //	tr := new(dns.Transfer)
 //	tr := new(dns.Transfer)
-//	tr.Out(w, r, ch)
-//	c <- &dns.Envelope{RR: []dns.RR{soa, rr1, rr2, rr3, soa}}
+//	go tr.Out(w, r, ch)
+//	ch <- &dns.Envelope{RR: []dns.RR{soa, rr1, rr2, rr3, soa}}
 //	close(ch)
 //	close(ch)
 //	w.Hijack()
 //	w.Hijack()
 //	// w.Close() // Client closes connection
 //	// w.Close() // Client closes connection

+ 0 - 161
vendor/github.com/miekg/dns/xfr_test.go

@@ -1,161 +0,0 @@
-// +build net
-
-package dns
-
-import (
-	"net"
-	"testing"
-	"time"
-)
-
-func getIP(s string) string {
-	a, err := net.LookupAddr(s)
-	if err != nil {
-		return ""
-	}
-	return a[0]
-}
-
-// flaky, need to setup local server and test from
-// that.
-func TestAXFR_Miek(t *testing.T) {
-	// This test runs against a server maintained by Miek
-	if testing.Short() {
-		return
-	}
-	m := new(Msg)
-	m.SetAxfr("miek.nl.")
-
-	server := getIP("linode.atoom.net")
-
-	tr := new(Transfer)
-
-	if a, err := tr.In(m, net.JoinHostPort(server, "53")); err != nil {
-		t.Fatal("failed to setup axfr: ", err)
-	} else {
-		for ex := range a {
-			if ex.Error != nil {
-				t.Errorf("error %v", ex.Error)
-				break
-			}
-			for _, rr := range ex.RR {
-				t.Log(rr.String())
-			}
-		}
-	}
-}
-
-// fails.
-func TestAXFR_NLNL_MultipleEnvelopes(t *testing.T) {
-	// This test runs against a server maintained by NLnet Labs
-	if testing.Short() {
-		return
-	}
-	m := new(Msg)
-	m.SetAxfr("nlnetlabs.nl.")
-
-	server := getIP("open.nlnetlabs.nl.")
-
-	tr := new(Transfer)
-	if a, err := tr.In(m, net.JoinHostPort(server, "53")); err != nil {
-		t.Fatalf("failed to setup axfr %v for server: %v", err, server)
-	} else {
-		for ex := range a {
-			if ex.Error != nil {
-				t.Errorf("error %v", ex.Error)
-				break
-			}
-		}
-	}
-}
-
-func TestAXFR_Miek_Tsig(t *testing.T) {
-	// This test runs against a server maintained by Miek
-	if testing.Short() {
-		return
-	}
-	m := new(Msg)
-	m.SetAxfr("example.nl.")
-	m.SetTsig("axfr.", HmacMD5, 300, time.Now().Unix())
-
-	tr := new(Transfer)
-	tr.TsigSecret = map[string]string{"axfr.": "so6ZGir4GPAqINNh9U5c3A=="}
-
-	if a, err := tr.In(m, "176.58.119.54:53"); err != nil {
-		t.Fatal("failed to setup axfr: ", err)
-	} else {
-		for ex := range a {
-			if ex.Error != nil {
-				t.Errorf("error %v", ex.Error)
-				break
-			}
-			for _, rr := range ex.RR {
-				t.Log(rr.String())
-			}
-		}
-	}
-}
-
-func TestAXFR_SIDN_NSD3_NONE(t *testing.T)   { testAXFRSIDN(t, "nsd", "") }
-func TestAXFR_SIDN_NSD3_MD5(t *testing.T)    { testAXFRSIDN(t, "nsd", HmacMD5) }
-func TestAXFR_SIDN_NSD3_SHA1(t *testing.T)   { testAXFRSIDN(t, "nsd", HmacSHA1) }
-func TestAXFR_SIDN_NSD3_SHA256(t *testing.T) { testAXFRSIDN(t, "nsd", HmacSHA256) }
-
-func TestAXFR_SIDN_NSD4_NONE(t *testing.T)   { testAXFRSIDN(t, "nsd4", "") }
-func TestAXFR_SIDN_NSD4_MD5(t *testing.T)    { testAXFRSIDN(t, "nsd4", HmacMD5) }
-func TestAXFR_SIDN_NSD4_SHA1(t *testing.T)   { testAXFRSIDN(t, "nsd4", HmacSHA1) }
-func TestAXFR_SIDN_NSD4_SHA256(t *testing.T) { testAXFRSIDN(t, "nsd4", HmacSHA256) }
-
-func TestAXFR_SIDN_BIND9_NONE(t *testing.T)   { testAXFRSIDN(t, "bind9", "") }
-func TestAXFR_SIDN_BIND9_MD5(t *testing.T)    { testAXFRSIDN(t, "bind9", HmacMD5) }
-func TestAXFR_SIDN_BIND9_SHA1(t *testing.T)   { testAXFRSIDN(t, "bind9", HmacSHA1) }
-func TestAXFR_SIDN_BIND9_SHA256(t *testing.T) { testAXFRSIDN(t, "bind9", HmacSHA256) }
-
-func TestAXFR_SIDN_KNOT_NONE(t *testing.T)   { testAXFRSIDN(t, "knot", "") }
-func TestAXFR_SIDN_KNOT_MD5(t *testing.T)    { testAXFRSIDN(t, "knot", HmacMD5) }
-func TestAXFR_SIDN_KNOT_SHA1(t *testing.T)   { testAXFRSIDN(t, "knot", HmacSHA1) }
-func TestAXFR_SIDN_KNOT_SHA256(t *testing.T) { testAXFRSIDN(t, "knot", HmacSHA256) }
-
-func TestAXFR_SIDN_POWERDNS_NONE(t *testing.T)   { testAXFRSIDN(t, "powerdns", "") }
-func TestAXFR_SIDN_POWERDNS_MD5(t *testing.T)    { testAXFRSIDN(t, "powerdns", HmacMD5) }
-func TestAXFR_SIDN_POWERDNS_SHA1(t *testing.T)   { testAXFRSIDN(t, "powerdns", HmacSHA1) }
-func TestAXFR_SIDN_POWERDNS_SHA256(t *testing.T) { testAXFRSIDN(t, "powerdns", HmacSHA256) }
-
-func TestAXFR_SIDN_YADIFA_NONE(t *testing.T)   { testAXFRSIDN(t, "yadifa", "") }
-func TestAXFR_SIDN_YADIFA_MD5(t *testing.T)    { testAXFRSIDN(t, "yadifa", HmacMD5) }
-func TestAXFR_SIDN_YADIFA_SHA1(t *testing.T)   { testAXFRSIDN(t, "yadifa", HmacSHA1) }
-func TestAXFR_SIDN_YADIFA_SHA256(t *testing.T) { testAXFRSIDN(t, "yadifa", HmacSHA256) }
-
-func testAXFRSIDN(t *testing.T, host, alg string) {
-	// This tests run against a server maintained by SIDN labs, see:
-	// https://workbench.sidnlabs.nl/
-	if testing.Short() {
-		return
-	}
-	x := new(Transfer)
-	x.TsigSecret = map[string]string{
-		"wb_md5.":          "Wu/utSasZUkoeCNku152Zw==",
-		"wb_sha1_longkey.": "uhMpEhPq/RAD9Bt4mqhfmi+7ZdKmjLQb/lcrqYPXR4s/nnbsqw==",
-		"wb_sha256.":       "npfrIJjt/MJOjGJoBNZtsjftKMhkSpIYMv2RzRZt1f8=",
-	}
-	keyname := map[string]string{
-		HmacMD5:    "wb_md5.",
-		HmacSHA1:   "wb_sha1_longkey.",
-		HmacSHA256: "wb_sha256.",
-	}[alg]
-
-	m := new(Msg)
-	m.SetAxfr("types.wb.sidnlabs.nl.")
-	if keyname != "" {
-		m.SetTsig(keyname, alg, 300, time.Now().Unix())
-	}
-	c, err := x.In(m, host+".sidnlabs.nl:53")
-	if err != nil {
-		t.Fatal(err)
-	}
-	for e := range c {
-		if e.Error != nil {
-			t.Fatal(e.Error)
-		}
-	}
-}

+ 3529 - 0
vendor/github.com/miekg/dns/zmsg.go

@@ -0,0 +1,3529 @@
+// *** DO NOT MODIFY ***
+// AUTOGENERATED BY go generate from msg_generate.go
+
+package dns
+
+// pack*() functions
+
+func (rr *A) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packDataA(rr.A, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *AAAA) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packDataAAAA(rr.AAAA, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *AFSDB) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint16(rr.Subtype, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = PackDomainName(rr.Hostname, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *ANY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *CAA) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint8(rr.Flag, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packString(rr.Tag, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packStringOctet(rr.Value, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *CDNSKEY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint16(rr.Flags, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.Protocol, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.Algorithm, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packStringBase64(rr.PublicKey, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *CDS) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint16(rr.KeyTag, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.Algorithm, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.DigestType, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packStringHex(rr.Digest, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *CERT) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint16(rr.Type, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint16(rr.KeyTag, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.Algorithm, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packStringBase64(rr.Certificate, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *CNAME) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = PackDomainName(rr.Target, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *DHCID) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packStringBase64(rr.Digest, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *DLV) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint16(rr.KeyTag, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.Algorithm, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.DigestType, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packStringHex(rr.Digest, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *DNAME) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = PackDomainName(rr.Target, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *DNSKEY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint16(rr.Flags, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.Protocol, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.Algorithm, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packStringBase64(rr.PublicKey, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *DS) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint16(rr.KeyTag, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.Algorithm, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.DigestType, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packStringHex(rr.Digest, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *EID) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packStringHex(rr.Endpoint, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *EUI48) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint48(rr.Address, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *EUI64) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint64(rr.Address, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *GID) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint32(rr.Gid, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *GPOS) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packString(rr.Longitude, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packString(rr.Latitude, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packString(rr.Altitude, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *HINFO) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packString(rr.Cpu, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packString(rr.Os, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *HIP) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint8(rr.HitLength, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.PublicKeyAlgorithm, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint16(rr.PublicKeyLength, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packStringHex(rr.Hit, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packStringBase64(rr.PublicKey, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packDataDomainNames(rr.RendezvousServers, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *KEY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint16(rr.Flags, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.Protocol, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.Algorithm, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packStringBase64(rr.PublicKey, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *KX) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint16(rr.Preference, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = PackDomainName(rr.Exchanger, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *L32) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint16(rr.Preference, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packDataA(rr.Locator32, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *L64) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint16(rr.Preference, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint64(rr.Locator64, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *LOC) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint8(rr.Version, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.Size, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.HorizPre, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.VertPre, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint32(rr.Latitude, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint32(rr.Longitude, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint32(rr.Altitude, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *LP) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint16(rr.Preference, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = PackDomainName(rr.Fqdn, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *MB) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = PackDomainName(rr.Mb, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *MD) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = PackDomainName(rr.Md, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *MF) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = PackDomainName(rr.Mf, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *MG) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = PackDomainName(rr.Mg, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *MINFO) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = PackDomainName(rr.Rmail, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	off, err = PackDomainName(rr.Email, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *MR) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = PackDomainName(rr.Mr, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *MX) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint16(rr.Preference, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = PackDomainName(rr.Mx, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *NAPTR) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint16(rr.Order, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint16(rr.Preference, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packString(rr.Flags, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packString(rr.Service, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packString(rr.Regexp, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = PackDomainName(rr.Replacement, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *NID) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint16(rr.Preference, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint64(rr.NodeID, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *NIMLOC) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packStringHex(rr.Locator, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *NINFO) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packStringTxt(rr.ZSData, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *NS) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = PackDomainName(rr.Ns, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *NSAPPTR) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = PackDomainName(rr.Ptr, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *NSEC) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = PackDomainName(rr.NextDomain, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	off, err = packDataNsec(rr.TypeBitMap, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *NSEC3) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint8(rr.Hash, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.Flags, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint16(rr.Iterations, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.SaltLength, msg, off)
+	if err != nil {
+		return off, err
+	}
+	if rr.Salt == "-" { /* do nothing, empty salt */
+	}
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.HashLength, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packStringBase32(rr.NextDomain, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packDataNsec(rr.TypeBitMap, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *NSEC3PARAM) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint8(rr.Hash, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.Flags, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint16(rr.Iterations, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.SaltLength, msg, off)
+	if err != nil {
+		return off, err
+	}
+	if rr.Salt == "-" { /* do nothing, empty salt */
+	}
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *OPENPGPKEY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packStringBase64(rr.PublicKey, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *OPT) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packDataOpt(rr.Option, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *PTR) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = PackDomainName(rr.Ptr, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *PX) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint16(rr.Preference, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = PackDomainName(rr.Map822, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	off, err = PackDomainName(rr.Mapx400, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *RFC3597) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packStringHex(rr.Rdata, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *RKEY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint16(rr.Flags, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.Protocol, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.Algorithm, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packStringBase64(rr.PublicKey, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *RP) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = PackDomainName(rr.Mbox, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	off, err = PackDomainName(rr.Txt, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *RRSIG) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint16(rr.TypeCovered, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.Algorithm, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.Labels, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint32(rr.OrigTtl, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint32(rr.Expiration, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint32(rr.Inception, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint16(rr.KeyTag, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = PackDomainName(rr.SignerName, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	off, err = packStringBase64(rr.Signature, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *RT) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint16(rr.Preference, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = PackDomainName(rr.Host, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *SIG) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint16(rr.TypeCovered, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.Algorithm, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.Labels, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint32(rr.OrigTtl, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint32(rr.Expiration, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint32(rr.Inception, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint16(rr.KeyTag, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = PackDomainName(rr.SignerName, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	off, err = packStringBase64(rr.Signature, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *SMIMEA) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint8(rr.Usage, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.Selector, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.MatchingType, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packStringHex(rr.Certificate, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *SOA) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = PackDomainName(rr.Ns, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	off, err = PackDomainName(rr.Mbox, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint32(rr.Serial, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint32(rr.Refresh, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint32(rr.Retry, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint32(rr.Expire, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint32(rr.Minttl, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *SPF) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packStringTxt(rr.Txt, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *SRV) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint16(rr.Priority, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint16(rr.Weight, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint16(rr.Port, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = PackDomainName(rr.Target, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *SSHFP) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint8(rr.Algorithm, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.Type, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packStringHex(rr.FingerPrint, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *TA) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint16(rr.KeyTag, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.Algorithm, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.DigestType, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packStringHex(rr.Digest, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *TALINK) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = PackDomainName(rr.PreviousName, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	off, err = PackDomainName(rr.NextName, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *TKEY) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = PackDomainName(rr.Algorithm, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint32(rr.Inception, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint32(rr.Expiration, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint16(rr.Mode, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint16(rr.Error, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint16(rr.KeySize, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packString(rr.Key, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint16(rr.OtherLen, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packString(rr.OtherData, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *TLSA) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint8(rr.Usage, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.Selector, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint8(rr.MatchingType, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packStringHex(rr.Certificate, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *TSIG) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = PackDomainName(rr.Algorithm, msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint48(rr.TimeSigned, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint16(rr.Fudge, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint16(rr.MACSize, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packStringHex(rr.MAC, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint16(rr.OrigId, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint16(rr.Error, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint16(rr.OtherLen, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packStringHex(rr.OtherData, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *TXT) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packStringTxt(rr.Txt, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *UID) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint32(rr.Uid, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *UINFO) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packString(rr.Uinfo, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *URI) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packUint16(rr.Priority, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packUint16(rr.Weight, msg, off)
+	if err != nil {
+		return off, err
+	}
+	off, err = packStringOctet(rr.Target, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+func (rr *X25) pack(msg []byte, off int, compression map[string]int, compress bool) (int, error) {
+	off, err := rr.Hdr.pack(msg, off, compression, compress)
+	if err != nil {
+		return off, err
+	}
+	headerEnd := off
+	off, err = packString(rr.PSDNAddress, msg, off)
+	if err != nil {
+		return off, err
+	}
+	rr.Header().Rdlength = uint16(off - headerEnd)
+	return off, nil
+}
+
+// unpack*() functions
+
+func unpackA(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(A)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.A, off, err = unpackDataA(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackAAAA(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(AAAA)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.AAAA, off, err = unpackDataAAAA(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackAFSDB(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(AFSDB)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Subtype, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Hostname, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackANY(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(ANY)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	return rr, off, err
+}
+
+func unpackCAA(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(CAA)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Flag, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Tag, off, err = unpackString(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Value, off, err = unpackStringOctet(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackCDNSKEY(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(CDNSKEY)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Flags, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Protocol, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Algorithm, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength))
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackCDS(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(CDS)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.KeyTag, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Algorithm, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.DigestType, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Digest, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength))
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackCERT(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(CERT)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Type, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.KeyTag, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Algorithm, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Certificate, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength))
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackCNAME(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(CNAME)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Target, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackDHCID(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(DHCID)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Digest, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength))
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackDLV(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(DLV)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.KeyTag, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Algorithm, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.DigestType, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Digest, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength))
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackDNAME(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(DNAME)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Target, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackDNSKEY(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(DNSKEY)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Flags, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Protocol, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Algorithm, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength))
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackDS(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(DS)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.KeyTag, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Algorithm, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.DigestType, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Digest, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength))
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackEID(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(EID)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Endpoint, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength))
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackEUI48(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(EUI48)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Address, off, err = unpackUint48(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackEUI64(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(EUI64)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Address, off, err = unpackUint64(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackGID(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(GID)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Gid, off, err = unpackUint32(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackGPOS(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(GPOS)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Longitude, off, err = unpackString(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Latitude, off, err = unpackString(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Altitude, off, err = unpackString(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackHINFO(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(HINFO)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Cpu, off, err = unpackString(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Os, off, err = unpackString(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackHIP(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(HIP)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.HitLength, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.PublicKeyAlgorithm, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.PublicKeyLength, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Hit, off, err = unpackStringHex(msg, off, off+int(rr.HitLength))
+	if err != nil {
+		return rr, off, err
+	}
+	rr.PublicKey, off, err = unpackStringBase64(msg, off, off+int(rr.PublicKeyLength))
+	if err != nil {
+		return rr, off, err
+	}
+	rr.RendezvousServers, off, err = unpackDataDomainNames(msg, off, rdStart+int(rr.Hdr.Rdlength))
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackKEY(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(KEY)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Flags, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Protocol, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Algorithm, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength))
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackKX(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(KX)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Preference, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Exchanger, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackL32(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(L32)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Preference, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Locator32, off, err = unpackDataA(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackL64(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(L64)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Preference, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Locator64, off, err = unpackUint64(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackLOC(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(LOC)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Version, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Size, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.HorizPre, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.VertPre, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Latitude, off, err = unpackUint32(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Longitude, off, err = unpackUint32(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Altitude, off, err = unpackUint32(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackLP(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(LP)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Preference, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Fqdn, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackMB(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(MB)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Mb, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackMD(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(MD)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Md, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackMF(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(MF)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Mf, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackMG(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(MG)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Mg, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackMINFO(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(MINFO)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Rmail, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Email, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackMR(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(MR)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Mr, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackMX(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(MX)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Preference, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Mx, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackNAPTR(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(NAPTR)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Order, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Preference, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Flags, off, err = unpackString(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Service, off, err = unpackString(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Regexp, off, err = unpackString(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Replacement, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackNID(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(NID)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Preference, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.NodeID, off, err = unpackUint64(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackNIMLOC(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(NIMLOC)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Locator, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength))
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackNINFO(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(NINFO)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.ZSData, off, err = unpackStringTxt(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackNS(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(NS)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Ns, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackNSAPPTR(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(NSAPPTR)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Ptr, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackNSEC(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(NSEC)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.NextDomain, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.TypeBitMap, off, err = unpackDataNsec(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackNSEC3(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(NSEC3)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Hash, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Flags, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Iterations, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.SaltLength, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Salt, off, err = unpackStringHex(msg, off, off+int(rr.SaltLength))
+	if err != nil {
+		return rr, off, err
+	}
+	rr.HashLength, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.NextDomain, off, err = unpackStringBase32(msg, off, off+int(rr.HashLength))
+	if err != nil {
+		return rr, off, err
+	}
+	rr.TypeBitMap, off, err = unpackDataNsec(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackNSEC3PARAM(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(NSEC3PARAM)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Hash, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Flags, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Iterations, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.SaltLength, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Salt, off, err = unpackStringHex(msg, off, off+int(rr.SaltLength))
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackOPENPGPKEY(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(OPENPGPKEY)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength))
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackOPT(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(OPT)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Option, off, err = unpackDataOpt(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackPTR(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(PTR)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Ptr, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackPX(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(PX)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Preference, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Map822, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Mapx400, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackRFC3597(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(RFC3597)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Rdata, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength))
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackRKEY(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(RKEY)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Flags, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Protocol, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Algorithm, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.PublicKey, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength))
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackRP(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(RP)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Mbox, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Txt, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackRRSIG(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(RRSIG)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.TypeCovered, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Algorithm, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Labels, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.OrigTtl, off, err = unpackUint32(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Expiration, off, err = unpackUint32(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Inception, off, err = unpackUint32(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.KeyTag, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.SignerName, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Signature, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength))
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackRT(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(RT)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Preference, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Host, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackSIG(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(SIG)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.TypeCovered, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Algorithm, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Labels, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.OrigTtl, off, err = unpackUint32(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Expiration, off, err = unpackUint32(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Inception, off, err = unpackUint32(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.KeyTag, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.SignerName, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Signature, off, err = unpackStringBase64(msg, off, rdStart+int(rr.Hdr.Rdlength))
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackSMIMEA(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(SMIMEA)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Usage, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Selector, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.MatchingType, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Certificate, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength))
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackSOA(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(SOA)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Ns, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Mbox, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Serial, off, err = unpackUint32(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Refresh, off, err = unpackUint32(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Retry, off, err = unpackUint32(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Expire, off, err = unpackUint32(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Minttl, off, err = unpackUint32(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackSPF(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(SPF)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Txt, off, err = unpackStringTxt(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackSRV(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(SRV)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Priority, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Weight, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Port, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Target, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackSSHFP(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(SSHFP)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Algorithm, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Type, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.FingerPrint, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength))
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackTA(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(TA)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.KeyTag, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Algorithm, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.DigestType, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Digest, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength))
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackTALINK(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(TALINK)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.PreviousName, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.NextName, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackTKEY(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(TKEY)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Algorithm, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Inception, off, err = unpackUint32(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Expiration, off, err = unpackUint32(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Mode, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Error, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.KeySize, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Key, off, err = unpackString(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.OtherLen, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.OtherData, off, err = unpackString(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackTLSA(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(TLSA)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Usage, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Selector, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.MatchingType, off, err = unpackUint8(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Certificate, off, err = unpackStringHex(msg, off, rdStart+int(rr.Hdr.Rdlength))
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackTSIG(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(TSIG)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Algorithm, off, err = UnpackDomainName(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.TimeSigned, off, err = unpackUint48(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Fudge, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.MACSize, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.MAC, off, err = unpackStringHex(msg, off, off+int(rr.MACSize))
+	if err != nil {
+		return rr, off, err
+	}
+	rr.OrigId, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Error, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.OtherLen, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.OtherData, off, err = unpackStringHex(msg, off, off+int(rr.OtherLen))
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackTXT(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(TXT)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Txt, off, err = unpackStringTxt(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackUID(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(UID)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Uid, off, err = unpackUint32(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackUINFO(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(UINFO)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Uinfo, off, err = unpackString(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackURI(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(URI)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.Priority, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Weight, off, err = unpackUint16(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	if off == len(msg) {
+		return rr, off, nil
+	}
+	rr.Target, off, err = unpackStringOctet(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+func unpackX25(h RR_Header, msg []byte, off int) (RR, int, error) {
+	rr := new(X25)
+	rr.Hdr = h
+	if noRdata(h) {
+		return rr, off, nil
+	}
+	var err error
+	rdStart := off
+	_ = rdStart
+
+	rr.PSDNAddress, off, err = unpackString(msg, off)
+	if err != nil {
+		return rr, off, err
+	}
+	return rr, off, err
+}
+
+var typeToUnpack = map[uint16]func(RR_Header, []byte, int) (RR, int, error){
+	TypeA:          unpackA,
+	TypeAAAA:       unpackAAAA,
+	TypeAFSDB:      unpackAFSDB,
+	TypeANY:        unpackANY,
+	TypeCAA:        unpackCAA,
+	TypeCDNSKEY:    unpackCDNSKEY,
+	TypeCDS:        unpackCDS,
+	TypeCERT:       unpackCERT,
+	TypeCNAME:      unpackCNAME,
+	TypeDHCID:      unpackDHCID,
+	TypeDLV:        unpackDLV,
+	TypeDNAME:      unpackDNAME,
+	TypeDNSKEY:     unpackDNSKEY,
+	TypeDS:         unpackDS,
+	TypeEID:        unpackEID,
+	TypeEUI48:      unpackEUI48,
+	TypeEUI64:      unpackEUI64,
+	TypeGID:        unpackGID,
+	TypeGPOS:       unpackGPOS,
+	TypeHINFO:      unpackHINFO,
+	TypeHIP:        unpackHIP,
+	TypeKEY:        unpackKEY,
+	TypeKX:         unpackKX,
+	TypeL32:        unpackL32,
+	TypeL64:        unpackL64,
+	TypeLOC:        unpackLOC,
+	TypeLP:         unpackLP,
+	TypeMB:         unpackMB,
+	TypeMD:         unpackMD,
+	TypeMF:         unpackMF,
+	TypeMG:         unpackMG,
+	TypeMINFO:      unpackMINFO,
+	TypeMR:         unpackMR,
+	TypeMX:         unpackMX,
+	TypeNAPTR:      unpackNAPTR,
+	TypeNID:        unpackNID,
+	TypeNIMLOC:     unpackNIMLOC,
+	TypeNINFO:      unpackNINFO,
+	TypeNS:         unpackNS,
+	TypeNSAPPTR:    unpackNSAPPTR,
+	TypeNSEC:       unpackNSEC,
+	TypeNSEC3:      unpackNSEC3,
+	TypeNSEC3PARAM: unpackNSEC3PARAM,
+	TypeOPENPGPKEY: unpackOPENPGPKEY,
+	TypeOPT:        unpackOPT,
+	TypePTR:        unpackPTR,
+	TypePX:         unpackPX,
+	TypeRKEY:       unpackRKEY,
+	TypeRP:         unpackRP,
+	TypeRRSIG:      unpackRRSIG,
+	TypeRT:         unpackRT,
+	TypeSIG:        unpackSIG,
+	TypeSMIMEA:     unpackSMIMEA,
+	TypeSOA:        unpackSOA,
+	TypeSPF:        unpackSPF,
+	TypeSRV:        unpackSRV,
+	TypeSSHFP:      unpackSSHFP,
+	TypeTA:         unpackTA,
+	TypeTALINK:     unpackTALINK,
+	TypeTKEY:       unpackTKEY,
+	TypeTLSA:       unpackTLSA,
+	TypeTSIG:       unpackTSIG,
+	TypeTXT:        unpackTXT,
+	TypeUID:        unpackUID,
+	TypeUINFO:      unpackUINFO,
+	TypeURI:        unpackURI,
+	TypeX25:        unpackX25,
+}

+ 15 - 15
vendor/github.com/miekg/dns/ztypes.go

@@ -1,5 +1,5 @@
 // *** DO NOT MODIFY ***
 // *** DO NOT MODIFY ***
-// AUTOGENERATED BY go generate
+// AUTOGENERATED BY go generate from type_generate.go
 
 
 package dns
 package dns
 
 
@@ -31,7 +31,6 @@ var TypeToRR = map[uint16]func() RR{
 	TypeGPOS:       func() RR { return new(GPOS) },
 	TypeGPOS:       func() RR { return new(GPOS) },
 	TypeHINFO:      func() RR { return new(HINFO) },
 	TypeHINFO:      func() RR { return new(HINFO) },
 	TypeHIP:        func() RR { return new(HIP) },
 	TypeHIP:        func() RR { return new(HIP) },
-	TypeIPSECKEY:   func() RR { return new(IPSECKEY) },
 	TypeKEY:        func() RR { return new(KEY) },
 	TypeKEY:        func() RR { return new(KEY) },
 	TypeKX:         func() RR { return new(KX) },
 	TypeKX:         func() RR { return new(KX) },
 	TypeL32:        func() RR { return new(L32) },
 	TypeL32:        func() RR { return new(L32) },
@@ -63,6 +62,7 @@ var TypeToRR = map[uint16]func() RR{
 	TypeRRSIG:      func() RR { return new(RRSIG) },
 	TypeRRSIG:      func() RR { return new(RRSIG) },
 	TypeRT:         func() RR { return new(RT) },
 	TypeRT:         func() RR { return new(RT) },
 	TypeSIG:        func() RR { return new(SIG) },
 	TypeSIG:        func() RR { return new(SIG) },
+	TypeSMIMEA:     func() RR { return new(SMIMEA) },
 	TypeSOA:        func() RR { return new(SOA) },
 	TypeSOA:        func() RR { return new(SOA) },
 	TypeSPF:        func() RR { return new(SPF) },
 	TypeSPF:        func() RR { return new(SPF) },
 	TypeSRV:        func() RR { return new(SRV) },
 	TypeSRV:        func() RR { return new(SRV) },
@@ -76,7 +76,6 @@ var TypeToRR = map[uint16]func() RR{
 	TypeUID:        func() RR { return new(UID) },
 	TypeUID:        func() RR { return new(UID) },
 	TypeUINFO:      func() RR { return new(UINFO) },
 	TypeUINFO:      func() RR { return new(UINFO) },
 	TypeURI:        func() RR { return new(URI) },
 	TypeURI:        func() RR { return new(URI) },
-	TypeWKS:        func() RR { return new(WKS) },
 	TypeX25:        func() RR { return new(X25) },
 	TypeX25:        func() RR { return new(X25) },
 }
 }
 
 
@@ -105,7 +104,6 @@ var TypeToString = map[uint16]string{
 	TypeGPOS:       "GPOS",
 	TypeGPOS:       "GPOS",
 	TypeHINFO:      "HINFO",
 	TypeHINFO:      "HINFO",
 	TypeHIP:        "HIP",
 	TypeHIP:        "HIP",
-	TypeIPSECKEY:   "IPSECKEY",
 	TypeISDN:       "ISDN",
 	TypeISDN:       "ISDN",
 	TypeIXFR:       "IXFR",
 	TypeIXFR:       "IXFR",
 	TypeKEY:        "KEY",
 	TypeKEY:        "KEY",
@@ -144,6 +142,7 @@ var TypeToString = map[uint16]string{
 	TypeRT:         "RT",
 	TypeRT:         "RT",
 	TypeReserved:   "Reserved",
 	TypeReserved:   "Reserved",
 	TypeSIG:        "SIG",
 	TypeSIG:        "SIG",
+	TypeSMIMEA:     "SMIMEA",
 	TypeSOA:        "SOA",
 	TypeSOA:        "SOA",
 	TypeSPF:        "SPF",
 	TypeSPF:        "SPF",
 	TypeSRV:        "SRV",
 	TypeSRV:        "SRV",
@@ -158,7 +157,6 @@ var TypeToString = map[uint16]string{
 	TypeUINFO:      "UINFO",
 	TypeUINFO:      "UINFO",
 	TypeUNSPEC:     "UNSPEC",
 	TypeUNSPEC:     "UNSPEC",
 	TypeURI:        "URI",
 	TypeURI:        "URI",
-	TypeWKS:        "WKS",
 	TypeX25:        "X25",
 	TypeX25:        "X25",
 	TypeNSAPPTR:    "NSAP-PTR",
 	TypeNSAPPTR:    "NSAP-PTR",
 }
 }
@@ -185,7 +183,6 @@ func (rr *GID) Header() *RR_Header        { return &rr.Hdr }
 func (rr *GPOS) Header() *RR_Header       { return &rr.Hdr }
 func (rr *GPOS) Header() *RR_Header       { return &rr.Hdr }
 func (rr *HINFO) Header() *RR_Header      { return &rr.Hdr }
 func (rr *HINFO) Header() *RR_Header      { return &rr.Hdr }
 func (rr *HIP) Header() *RR_Header        { return &rr.Hdr }
 func (rr *HIP) Header() *RR_Header        { return &rr.Hdr }
-func (rr *IPSECKEY) Header() *RR_Header   { return &rr.Hdr }
 func (rr *KEY) Header() *RR_Header        { return &rr.Hdr }
 func (rr *KEY) Header() *RR_Header        { return &rr.Hdr }
 func (rr *KX) Header() *RR_Header         { return &rr.Hdr }
 func (rr *KX) Header() *RR_Header         { return &rr.Hdr }
 func (rr *L32) Header() *RR_Header        { return &rr.Hdr }
 func (rr *L32) Header() *RR_Header        { return &rr.Hdr }
@@ -218,6 +215,7 @@ func (rr *RP) Header() *RR_Header         { return &rr.Hdr }
 func (rr *RRSIG) Header() *RR_Header      { return &rr.Hdr }
 func (rr *RRSIG) Header() *RR_Header      { return &rr.Hdr }
 func (rr *RT) Header() *RR_Header         { return &rr.Hdr }
 func (rr *RT) Header() *RR_Header         { return &rr.Hdr }
 func (rr *SIG) Header() *RR_Header        { return &rr.Hdr }
 func (rr *SIG) Header() *RR_Header        { return &rr.Hdr }
+func (rr *SMIMEA) Header() *RR_Header     { return &rr.Hdr }
 func (rr *SOA) Header() *RR_Header        { return &rr.Hdr }
 func (rr *SOA) Header() *RR_Header        { return &rr.Hdr }
 func (rr *SPF) Header() *RR_Header        { return &rr.Hdr }
 func (rr *SPF) Header() *RR_Header        { return &rr.Hdr }
 func (rr *SRV) Header() *RR_Header        { return &rr.Hdr }
 func (rr *SRV) Header() *RR_Header        { return &rr.Hdr }
@@ -231,7 +229,6 @@ func (rr *TXT) Header() *RR_Header        { return &rr.Hdr }
 func (rr *UID) Header() *RR_Header        { return &rr.Hdr }
 func (rr *UID) Header() *RR_Header        { return &rr.Hdr }
 func (rr *UINFO) Header() *RR_Header      { return &rr.Hdr }
 func (rr *UINFO) Header() *RR_Header      { return &rr.Hdr }
 func (rr *URI) Header() *RR_Header        { return &rr.Hdr }
 func (rr *URI) Header() *RR_Header        { return &rr.Hdr }
-func (rr *WKS) Header() *RR_Header        { return &rr.Hdr }
 func (rr *X25) Header() *RR_Header        { return &rr.Hdr }
 func (rr *X25) Header() *RR_Header        { return &rr.Hdr }
 
 
 // len() functions
 // len() functions
@@ -520,6 +517,14 @@ func (rr *RT) len() int {
 	l += len(rr.Host) + 1
 	l += len(rr.Host) + 1
 	return l
 	return l
 }
 }
+func (rr *SMIMEA) len() int {
+	l := rr.Hdr.len()
+	l += 1 // Usage
+	l += 1 // Selector
+	l += 1 // MatchingType
+	l += len(rr.Certificate)/2 + 1
+	return l
+}
 func (rr *SOA) len() int {
 func (rr *SOA) len() int {
 	l := rr.Hdr.len()
 	l := rr.Hdr.len()
 	l += len(rr.Ns) + 1
 	l += len(rr.Ns) + 1
@@ -688,9 +693,6 @@ func (rr *HIP) copy() RR {
 	copy(RendezvousServers, rr.RendezvousServers)
 	copy(RendezvousServers, rr.RendezvousServers)
 	return &HIP{*rr.Hdr.copyHeader(), rr.HitLength, rr.PublicKeyAlgorithm, rr.PublicKeyLength, rr.Hit, rr.PublicKey, RendezvousServers}
 	return &HIP{*rr.Hdr.copyHeader(), rr.HitLength, rr.PublicKeyAlgorithm, rr.PublicKeyLength, rr.Hit, rr.PublicKey, RendezvousServers}
 }
 }
-func (rr *IPSECKEY) copy() RR {
-	return &IPSECKEY{*rr.Hdr.copyHeader(), rr.Precedence, rr.GatewayType, rr.Algorithm, copyIP(rr.GatewayA), copyIP(rr.GatewayAAAA), rr.GatewayName, rr.PublicKey}
-}
 func (rr *KX) copy() RR {
 func (rr *KX) copy() RR {
 	return &KX{*rr.Hdr.copyHeader(), rr.Preference, rr.Exchanger}
 	return &KX{*rr.Hdr.copyHeader(), rr.Preference, rr.Exchanger}
 }
 }
@@ -789,6 +791,9 @@ func (rr *RRSIG) copy() RR {
 func (rr *RT) copy() RR {
 func (rr *RT) copy() RR {
 	return &RT{*rr.Hdr.copyHeader(), rr.Preference, rr.Host}
 	return &RT{*rr.Hdr.copyHeader(), rr.Preference, rr.Host}
 }
 }
+func (rr *SMIMEA) copy() RR {
+	return &SMIMEA{*rr.Hdr.copyHeader(), rr.Usage, rr.Selector, rr.MatchingType, rr.Certificate}
+}
 func (rr *SOA) copy() RR {
 func (rr *SOA) copy() RR {
 	return &SOA{*rr.Hdr.copyHeader(), rr.Ns, rr.Mbox, rr.Serial, rr.Refresh, rr.Retry, rr.Expire, rr.Minttl}
 	return &SOA{*rr.Hdr.copyHeader(), rr.Ns, rr.Mbox, rr.Serial, rr.Refresh, rr.Retry, rr.Expire, rr.Minttl}
 }
 }
@@ -832,11 +837,6 @@ func (rr *UINFO) copy() RR {
 func (rr *URI) copy() RR {
 func (rr *URI) copy() RR {
 	return &URI{*rr.Hdr.copyHeader(), rr.Priority, rr.Weight, rr.Target}
 	return &URI{*rr.Hdr.copyHeader(), rr.Priority, rr.Weight, rr.Target}
 }
 }
-func (rr *WKS) copy() RR {
-	BitMap := make([]uint16, len(rr.BitMap))
-	copy(BitMap, rr.BitMap)
-	return &WKS{*rr.Hdr.copyHeader(), copyIP(rr.Address), rr.Protocol, BitMap}
-}
 func (rr *X25) copy() RR {
 func (rr *X25) copy() RR {
 	return &X25{*rr.Hdr.copyHeader(), rr.PSDNAddress}
 	return &X25{*rr.Hdr.copyHeader(), rr.PSDNAddress}
 }
 }

Some files were not shown because too many files changed in this diff