mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-27 23:19:58 +00:00
TUN-857: Pull the brotli-go dependency from Github
This commit is contained in:
3
vendor/github.com/coredns/coredns/plugin/normalize.go
generated
vendored
3
vendor/github.com/coredns/coredns/plugin/normalize.go
generated
vendored
@@ -125,8 +125,7 @@ func SplitHostPort(s string) (host, port string, ipnet *net.IPNet, err error) {
|
||||
// Get the first lower octet boundary to see what encompassing zone we should be authoritative for.
|
||||
mod := (bits - ones) % sizeDigit
|
||||
nearest := (bits - ones) + mod
|
||||
offset := 0
|
||||
var end bool
|
||||
offset, end := 0, false
|
||||
for i := 0; i < nearest/sizeDigit; i++ {
|
||||
offset, end = dns.NextLabel(rev, offset)
|
||||
if end {
|
||||
|
18
vendor/github.com/coredns/coredns/request/request.go
generated
vendored
18
vendor/github.com/coredns/coredns/request/request.go
generated
vendored
@@ -263,16 +263,12 @@ func (r *Request) Scrub(reply *dns.Msg) (*dns.Msg, Result) {
|
||||
|
||||
// Account for the OPT record that gets added in SizeAndDo(), subtract that length.
|
||||
sub := 0
|
||||
if r.Req.IsEdns0() != nil {
|
||||
if r.Do() {
|
||||
sub = optLen
|
||||
}
|
||||
|
||||
// substract to make spaces for re-added EDNS0 OPT RR.
|
||||
re := len(reply.Extra) - sub
|
||||
size -= sub
|
||||
|
||||
l, m := 0, 0
|
||||
origExtra := reply.Extra
|
||||
re := len(reply.Extra) - sub
|
||||
l, m := 0, 0
|
||||
for l < re {
|
||||
m = (l + re) / 2
|
||||
reply.Extra = origExtra[:m]
|
||||
@@ -301,9 +297,9 @@ func (r *Request) Scrub(reply *dns.Msg) (*dns.Msg, Result) {
|
||||
return reply, ScrubExtra
|
||||
}
|
||||
|
||||
origAnswer := reply.Answer
|
||||
ra := len(reply.Answer)
|
||||
l, m = 0, 0
|
||||
origAnswer := reply.Answer
|
||||
for l < ra {
|
||||
m = (l + ra) / 2
|
||||
reply.Answer = origAnswer[:m]
|
||||
@@ -328,12 +324,14 @@ func (r *Request) Scrub(reply *dns.Msg) (*dns.Msg, Result) {
|
||||
// this extra m-1 step does make it fit in the client's buffer however.
|
||||
}
|
||||
|
||||
r.SizeAndDo(reply)
|
||||
// It now fits, but Truncated. We can't call sizeAndDo() because that adds a new record (OPT)
|
||||
// in the additional section.
|
||||
reply.Truncated = true
|
||||
return reply, ScrubAnswer
|
||||
}
|
||||
|
||||
// Type returns the type of the question as a string. If the request is malformed the empty string is returned.
|
||||
// Type returns the type of the question as a string. If the request is malformed
|
||||
// the empty string is returned.
|
||||
func (r *Request) Type() string {
|
||||
if r.Req == nil {
|
||||
return ""
|
||||
|
Reference in New Issue
Block a user