Commit bf356e79 authored by yuxiaobo96's avatar yuxiaobo96 Committed by corbot[bot]

fix spelling mistakes (#3364)

Automatically submitted.
parent 65458b2d
## CoreDNS ## CoreDNS
*coredns* - plugable DNS nameserver optimized for service discovery and flexibility. *coredns* - pluggable DNS nameserver optimized for service discovery and flexibility.
## Synopsis ## Synopsis
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
## Description ## Description
With `acl` enabled, users are able to block suspicous DNS queries by configuring IP filter rule sets, i.e. allowing authorized queries to recurse or blocking unauthorized queries. With `acl` enabled, users are able to block suspicious DNS queries by configuring IP filter rule sets, i.e. allowing authorized queries to recurse or blocking unauthorized queries.
This plugin can be used multiple times per Server Block. This plugin can be used multiple times per Server Block.
......
...@@ -81,7 +81,7 @@ RulesCheckLoop: ...@@ -81,7 +81,7 @@ RulesCheckLoop:
} }
// matchWithPolicies matches the DNS query with a list of ACL polices and returns suitable // matchWithPolicies matches the DNS query with a list of ACL polices and returns suitable
// action agains the query. // action against the query.
func matchWithPolicies(policies []policy, w dns.ResponseWriter, r *dns.Msg) action { func matchWithPolicies(policies []policy, w dns.ResponseWriter, r *dns.Msg) action {
state := request.Request{W: w, Req: r} state := request.Request{W: w, Req: r}
......
...@@ -118,14 +118,14 @@ func (t *Transport) cleanup(all bool) { ...@@ -118,14 +118,14 @@ func (t *Transport) cleanup(all bool) {
} }
} }
// It is hard to pin a value to this, the import thing is to no block forever, loosing at cached connection is not terrible. // It is hard to pin a value to this, the import thing is to no block forever, losing at cached connection is not terrible.
const yieldTimeout = 25 * time.Millisecond const yieldTimeout = 25 * time.Millisecond
// Yield return the connection to transport for reuse. // Yield return the connection to transport for reuse.
func (t *Transport) Yield(pc *persistConn) { func (t *Transport) Yield(pc *persistConn) {
pc.used = time.Now() // update used time pc.used = time.Now() // update used time
// Make ths non-blocking, because in the case of a very busy forwarder we will *block* on this yield. This // Make this non-blocking, because in the case of a very busy forwarder we will *block* on this yield. This
// blocks the outer go-routine and stuff will just pile up. We timeout when the send fails to as returning // blocks the outer go-routine and stuff will just pile up. We timeout when the send fails to as returning
// these connection is an optimization anyway. // these connection is an optimization anyway.
select { select {
......
...@@ -193,7 +193,7 @@ func maybeUnescape(s string) (string, error) { ...@@ -193,7 +193,7 @@ func maybeUnescape(s string) (string, error) {
case r >= rune('0') && r <= rune('9'): case r >= rune('0') && r <= rune('9'):
case r == rune('*'): case r == rune('*'):
if out != "" { if out != "" {
return "", errors.New("`*' ony supported as wildcard (leftmost label)") return "", errors.New("`*' only supported as wildcard (leftmost label)")
} }
case r == rune('-'): case r == rune('-'):
case r == rune('.'): case r == rune('.'):
......
...@@ -285,7 +285,7 @@ func TestMaybeUnescape(t *testing.T) { ...@@ -285,7 +285,7 @@ func TestMaybeUnescape(t *testing.T) {
// 3. Escaped dot, 'a' and a hyphen. No idea why but we'll allow it. // 3. Escaped dot, 'a' and a hyphen. No idea why but we'll allow it.
{escaped: `weird\\055ex\\141mple\\056com\\056\\056`, want: "weird-example.com.."}, {escaped: `weird\\055ex\\141mple\\056com\\056\\056`, want: "weird-example.com.."},
// 4. escaped `*` in the middle - NOT OK. // 4. escaped `*` in the middle - NOT OK.
{escaped: `e\\052ample.com`, wantErr: errors.New("`*' ony supported as wildcard (leftmost label)")}, {escaped: `e\\052ample.com`, wantErr: errors.New("`*' only supported as wildcard (leftmost label)")},
// 5. Invalid character. // 5. Invalid character.
{escaped: `\\000.example.com`, wantErr: errors.New(`invalid character: \\000`)}, {escaped: `\\000.example.com`, wantErr: errors.New(`invalid character: \\000`)},
// 6. Invalid escape sequence in the middle. // 6. Invalid escape sequence in the middle.
......
...@@ -31,7 +31,7 @@ const ( ...@@ -31,7 +31,7 @@ const (
DurationSignatureExpireDays = 32 * 24 * time.Hour // sign for 32 days DurationSignatureExpireDays = 32 * 24 * time.Hour // sign for 32 days
DurationRefreshHours = 5 * time.Hour // check zones every 5 hours DurationRefreshHours = 5 * time.Hour // check zones every 5 hours
DurationJitter = -18 * time.Hour // default max jitter DurationJitter = -18 * time.Hour // default max jitter
DurationSignatureInceptionHours = -3 * time.Hour // -(2+1) hours, be sure to catch daylight saving time and such, jitter is substracted DurationSignatureInceptionHours = -3 * time.Hour // -(2+1) hours, be sure to catch daylight saving time and such, jitter is subtracted
) )
const timeFmt = "2006-01-02T15:04:05.000Z07:00" const timeFmt = "2006-01-02T15:04:05.000Z07:00"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment