PLT-6076 Adding viper libs for config file changes (#5871)

* Adding viper libs for config file changes

* Removing the old fsnotify lib

* updating some missing libs
Этот коммит содержится в:
Corey Hulen
2017-03-24 23:31:34 -07:00
коммит произвёл enahum
родитель 7460302dec
Коммит 54d3d47daf
752 изменённых файлов: 463112 добавлений и 461 удалений

1
vendor/github.com/miekg/dns/README.md сгенерированный поставляемый
Просмотреть файл

@@ -57,6 +57,7 @@ A not-so-up-to-date-list-that-may-be-actually-current:
* https://github.com/fffaraz/microdns
* http://quilt.io
* https://github.com/ipdcode/hades (JD.COM)
* https://github.com/StackExchange/dnscontrol/
Send pull request if you want to be listed here.

2
vendor/github.com/miekg/dns/client.go сгенерированный поставляемый
Просмотреть файл

@@ -103,7 +103,7 @@ func ExchangeConn(c net.Conn, m *Msg) (r *Msg, err error) {
// case of truncation.
// It is up to the caller to create a message that allows for larger responses to be
// returned. Specifically this means adding an EDNS0 OPT RR that will advertise a larger
// buffer, see SetEdns0. Messsages without an OPT RR will fallback to the historic limit
// buffer, see SetEdns0. Messages without an OPT RR will fallback to the historic limit
// of 512 bytes.
func (c *Client) Exchange(m *Msg, a string) (r *Msg, rtt time.Duration, err error) {
if !c.SingleInflight {

47
vendor/github.com/miekg/dns/issue_test.go сгенерированный поставляемый
Просмотреть файл

@@ -2,7 +2,10 @@ package dns
// Tests that solve that an specific issue.
import "testing"
import (
"strings"
"testing"
)
func TestTCPRtt(t *testing.T) {
m := new(Msg)
@@ -21,3 +24,45 @@ func TestTCPRtt(t *testing.T) {
}
}
}
func TestNSEC3MissingSalt(t *testing.T) {
rr, err := NewRR("ji6neoaepv8b5o6k4ev33abha8ht9fgc.example. NSEC3 1 1 12 aabbccdd K8UDEMVP1J2F7EG6JEBPS17VP3N8I58H")
if err != nil {
t.Fatalf("failed to parse example rr: %s", err)
}
m := new(Msg)
m.Answer = []RR{rr}
mb, err := m.Pack()
if err != nil {
t.Fatalf("expected to pack message. err: %s", err)
}
if err := m.Unpack(mb); err != nil {
t.Fatalf("expected to unpack message. missing salt? err: %s", err)
}
in := rr.(*NSEC3).Salt
out := m.Answer[0].(*NSEC3).Salt
if in != out {
t.Fatalf("expected salts to match. packed: `%s`. returned: `%s`", in, out)
}
}
func TestNSEC3MixedNextDomain(t *testing.T) {
rr, err := NewRR("ji6neoaepv8b5o6k4ev33abha8ht9fgc.example. NSEC3 1 1 12 - k8udemvp1j2f7eg6jebps17vp3n8i58h")
if err != nil {
t.Fatalf("failed to parse example rr: %s", err)
}
m := new(Msg)
m.Answer = []RR{rr}
mb, err := m.Pack()
if err != nil {
t.Fatalf("expected to pack message. err: %s", err)
}
if err := m.Unpack(mb); err != nil {
t.Fatalf("expected to unpack message. err: %s", err)
}
in := strings.ToUpper(rr.(*NSEC3).NextDomain)
out := m.Answer[0].(*NSEC3).NextDomain
if in != out {
t.Fatalf("expected round trip to produce NextDomain `%s`, instead `%s`", in, out)
}
}

13
vendor/github.com/miekg/dns/msg.go сгенерированный поставляемый
Просмотреть файл

@@ -327,7 +327,6 @@ End:
// UnpackDomainName unpacks a domain name into a string.
func UnpackDomainName(msg []byte, off int) (string, int, error) {
s := make([]byte, 0, 64)
labels := 0
off1 := 0
lenmsg := len(msg)
ptr := 0 // number of pointers followed
@@ -370,15 +369,6 @@ Loop:
}
}
}
// never exceed the allowed label count lenght (63)
if labels >= 63 {
return "", lenmsg, &Error{err: "name exceeds 63 labels"}
}
labels += 1
// never exceed the allowed doman name length (255 octets)
if len(s) >= 255 {
return "", lenmsg, &Error{err: "name exceeded allowed 255 octets"}
}
s = append(s, '.')
off += c
case 0xC0:
@@ -398,9 +388,6 @@ Loop:
if ptr++; ptr > 10 {
return "", lenmsg, &Error{err: "too many compression pointers"}
}
// pointer should guarantee that it advances and points forwards at least
// but the condition on previous three lines guarantees that it's
// at least loop-free
off = (c^0xC0)<<8 | int(c1)
default:
// 0x80 and 0x40 are reserved

13
vendor/github.com/miekg/dns/msg_generate.go сгенерированный поставляемый
Просмотреть файл

@@ -139,8 +139,17 @@ return off, err
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")
case strings.HasPrefix(st.Tag(i), `dns:"size-hex:SaltLength`):
// directly write instead of using o() so we get the error check in the correct place
field := st.Field(i).Name()
fmt.Fprintf(b, `// Only pack salt if value is not "-", i.e. empty
if rr.%s != "-" {
off, err = packStringHex(rr.%s, msg, off)
if err != nil {
return off, err
}
}
`, field, field)
continue
case strings.HasPrefix(st.Tag(i), `dns:"size-hex`): // size-hex can be packed just like hex
fallthrough

5
vendor/github.com/miekg/dns/msg_helpers.go сгенерированный поставляемый
Просмотреть файл

@@ -142,6 +142,11 @@ func truncateMsgFromRdlength(msg []byte, off int, rdlength uint16) (truncmsg []b
}
func fromBase32(s []byte) (buf []byte, err error) {
for i, b := range s {
if b >= 'a' && b <= 'z' {
s[i] = b - 32
}
}
buflen := base32.HexEncoding.DecodedLen(len(s))
buf = make([]byte, buflen)
n, err := base32.HexEncoding.Decode(buf, s)

20
vendor/github.com/miekg/dns/zmsg.go сгенерированный поставляемый
Просмотреть файл

@@ -801,10 +801,12 @@ func (rr *NSEC3) pack(msg []byte, off int, compression map[string]int, compress
if err != nil {
return off, err
}
if rr.Salt == "-" { /* do nothing, empty salt */
}
if err != nil {
return off, err
// Only pack salt if value is not "-", i.e. empty
if rr.Salt != "-" {
off, err = packStringHex(rr.Salt, msg, off)
if err != nil {
return off, err
}
}
off, err = packUint8(rr.HashLength, msg, off)
if err != nil {
@@ -844,10 +846,12 @@ func (rr *NSEC3PARAM) pack(msg []byte, off int, compression map[string]int, comp
if err != nil {
return off, err
}
if rr.Salt == "-" { /* do nothing, empty salt */
}
if err != nil {
return off, err
// Only pack salt if value is not "-", i.e. empty
if rr.Salt != "-" {
off, err = packStringHex(rr.Salt, msg, off)
if err != nil {
return off, err
}
}
rr.Header().Rdlength = uint16(off - headerEnd)
return off, nil