1
0
mirror of https://github.com/fumiama/terasu-cloudflared.git synced 2026-06-18 01:26:23 +08:00

TUN-1615: revert miekg/dns to last known working revision

The last known good commit is 6da3249dfb57fbaa16efafcd8744cee8809d80cd before the first release tag.
This commit is contained in:
Marek Vavruša
2019-03-17 20:40:18 -07:00
parent 541cf68608
commit 781e1fef7b
274 changed files with 773 additions and 19087 deletions

19
vendor/github.com/miekg/dns/scan.go generated vendored
View File

@@ -1,10 +1,8 @@
package dns
import (
"fmt"
"io"
"os"
"path/filepath"
"strconv"
"strings"
)
@@ -299,24 +297,16 @@ func parseZone(r io.Reader, origin, f string, defttl *ttlState, t chan *Token, i
return
}
// Start with the new file
includePath := l.token
if !filepath.IsAbs(includePath) {
includePath = filepath.Join(filepath.Dir(f), includePath)
}
r1, e1 := os.Open(includePath)
r1, e1 := os.Open(l.token)
if e1 != nil {
msg := fmt.Sprintf("failed to open `%s'", l.token)
if !filepath.IsAbs(l.token) {
msg += fmt.Sprintf(" as `%s'", includePath)
}
t <- &Token{Error: &ParseError{f, msg, l}}
t <- &Token{Error: &ParseError{f, "failed to open `" + l.token + "'", l}}
return
}
if include+1 > 7 {
t <- &Token{Error: &ParseError{f, "too deeply nested $INCLUDE", l}}
return
}
parseZone(r1, neworigin, includePath, defttl, t, include+1)
parseZone(r1, neworigin, l.token, defttl, t, include+1)
st = zExpectOwnerDir
case zExpectDirTTLBl:
if l.value != zBlank {
@@ -577,7 +567,6 @@ func zlexer(s *scan, c chan lex) {
return
}
l.value = zRrtpe
rrtype = true
l.torc = t
}
}
@@ -601,7 +590,7 @@ func zlexer(s *scan, c chan lex) {
c <- l
}
stri = 0
// I reverse space stuff here
if !space && !commt {
l.value = zBlank
l.token = " "