Fix typos (#6235)
* Fix typos and add todo to fix spelling of dnsutil.MaximumDefaulTTL Signed-off-by: Zhizhen He <hezhizhen.yi@gmail.com>
This commit is contained in:
parent
c657af467b
commit
2fe5890d8b
13 changed files with 20 additions and 19 deletions
|
@ -13,7 +13,7 @@ If several addresses are provided, a listener will be open on each of the IP pro
|
|||
|
||||
Each address has to be an IP or name of one of the interfaces of the host. Bind by interface name, binds to the IPs on that interface at the time of startup or reload (reload will happen with a SIGHUP or if the config file changes).
|
||||
|
||||
If the given argument is an interface name, and that interface has serveral IP addresses, CoreDNS will listen on all of the interface IP addresses (including IPv4 and IPv6), except for IPv6 link-local addresses on that interface.
|
||||
If the given argument is an interface name, and that interface has several IP addresses, CoreDNS will listen on all of the interface IP addresses (including IPv4 and IPv6), except for IPv6 link-local addresses on that interface.
|
||||
|
||||
## Syntax
|
||||
|
||||
|
|
2
plugin/cache/cache_test.go
vendored
2
plugin/cache/cache_test.go
vendored
|
@ -671,7 +671,7 @@ func TestCacheWildcardMetadata(t *testing.T) {
|
|||
_, k := key(qname, w.Msg, response.NoError, state.Do())
|
||||
i, _ := c.pcache.Get(k)
|
||||
if i.(*item).wildcard != wildcard {
|
||||
t.Errorf("expected wildcard reponse to enter cache with cache item's wildcard = %q, got %q", wildcard, i.(*item).wildcard)
|
||||
t.Errorf("expected wildcard response to enter cache with cache item's wildcard = %q, got %q", wildcard, i.(*item).wildcard)
|
||||
}
|
||||
|
||||
// 2. Test retrieving the cached item from cache and writing its wildcard value to metadata
|
||||
|
|
|
@ -142,7 +142,7 @@ func TestNsAddrsExternalHeadless(t *testing.T) {
|
|||
k.APIConn = &APIConnTest{}
|
||||
k.localIPs = []net.IP{net.ParseIP("10.244.0.20")}
|
||||
|
||||
// there are only headless sevices
|
||||
// there are only headless services
|
||||
cdrs := k.nsAddrs(true, true, k.Zones[0])
|
||||
|
||||
if len(cdrs) != 1 {
|
||||
|
|
|
@ -162,7 +162,7 @@ func (w *weightedRR) topAddressIndex(address []dns.RR) int {
|
|||
w.mutex.Lock()
|
||||
defer w.mutex.Unlock()
|
||||
|
||||
// Dertermine the weight value for each address in the answer
|
||||
// Determine the weight value for each address in the answer
|
||||
var wsum uint
|
||||
type waddress struct {
|
||||
index int
|
||||
|
|
|
@ -48,5 +48,6 @@ const (
|
|||
// MinimalDefaultTTL is the absolute lowest TTL we use in CoreDNS.
|
||||
MinimalDefaultTTL = 5 * time.Second
|
||||
// MaximumDefaulTTL is the maximum TTL was use on RRsets in CoreDNS.
|
||||
// TODO: rename as MaximumDefaultTTL
|
||||
MaximumDefaulTTL = 1 * time.Hour
|
||||
)
|
||||
|
|
|
@ -11,7 +11,7 @@ func TestRegisterAndDeregisterListener(t *testing.T) {
|
|||
for _, name := range []string{"listener1", "listener2", "listener1"} {
|
||||
err := RegisterListener(NewMockListener(name))
|
||||
if err != nil {
|
||||
t.Errorf("RegsiterListener Error %s", err)
|
||||
t.Errorf("RegisterListener Error %s", err)
|
||||
}
|
||||
}
|
||||
if len(ls.listeners) != 2 {
|
||||
|
@ -46,7 +46,7 @@ func testListenersCalled(t *testing.T, listenerNames []string, outputs []string)
|
|||
for _, name := range listenerNames {
|
||||
err := RegisterListener(NewMockListener(name))
|
||||
if err != nil {
|
||||
t.Errorf("RegsiterListener Error %s", err)
|
||||
t.Errorf("RegisterListener Error %s", err)
|
||||
}
|
||||
}
|
||||
var f bytes.Buffer
|
||||
|
|
|
@ -10,9 +10,9 @@ import (
|
|||
// Probe is used to run a single Func until it returns true (indicating a target is healthy). If an Func
|
||||
// is already in progress no new one will be added, i.e. there is always a maximum of 1 checks in flight.
|
||||
//
|
||||
// There is a tradeoff to be made in figuring out quickly that an upstream is healthy and not doing to much work
|
||||
// (sending queries) to find that out. Having some kind of exp. backoff here won't help much, because you don't won't
|
||||
// to backoff too much. You then also need random queries to be perfomed every so often to quickly detect a working
|
||||
// There is a tradeoff to be made in figuring out quickly that an upstream is healthy and not doing much work
|
||||
// (sending queries) to find that out. Having some kind of exp. backoff here won't help much, because you don't want
|
||||
// to backoff too much. You then also need random queries to be performed every so often to quickly detect a working
|
||||
// upstream. In the end we just send a query every 0.5 second to check the upstream. This hopefully strikes a balance
|
||||
// between getting information about the upstream state quickly and not doing too much work. Note that 0.5s is still an
|
||||
// eternity in DNS, so we may actually want to shorten it.
|
||||
|
|
|
@ -407,7 +407,7 @@ rewrite edns0 subnet set 24 56
|
|||
* If the query's source IP address is an IPv6 address, the first 56 bits in the IP will be the network subnet.
|
||||
|
||||
|
||||
### CNAME Feild Rewrites
|
||||
### CNAME Field Rewrites
|
||||
|
||||
There might be a scenario where you want the `CNAME` target of the response to be rewritten. You can do this by using the `CNAME` field rewrite. This will generate new answer records according to the new `CNAME` target.
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ func (r *cnameTargetRule) RewriteResponse(res *dns.Msg, rr dns.RR) {
|
|||
newAnswer = append(newAnswer, rr)
|
||||
}
|
||||
}
|
||||
// iterate over upstream response recieved
|
||||
// iterate over upstream response received
|
||||
for _, rr := range upRes.Answer {
|
||||
if rr.Header().Name == toTarget {
|
||||
newAnswer = append(newAnswer, rr)
|
||||
|
|
|
@ -46,10 +46,10 @@ func TestTruncatedCNAME(t *testing.T) {
|
|||
_, err := handler.ServeDNS(context.TODO(), w, r)
|
||||
|
||||
if err != nil {
|
||||
t.Fatalf("Unexpecetd error %q", err)
|
||||
t.Fatalf("Unexpected error %q", err)
|
||||
}
|
||||
if w.Msg == nil {
|
||||
t.Fatalf("Unexpecetd empty response.")
|
||||
t.Fatalf("Unexpected empty response.")
|
||||
}
|
||||
if !w.Msg.Truncated {
|
||||
t.Error("Expected reply to be marked truncated.")
|
||||
|
|
|
@ -36,7 +36,7 @@ type Transferer interface {
|
|||
//
|
||||
// If serial is 0, handle as an AXFR request. Transfer should send all records
|
||||
// in the zone to the channel. The SOA should be written to the channel first, followed
|
||||
// by all other records, including all NS + glue records. The implemenation is also responsible
|
||||
// by all other records, including all NS + glue records. The implementation is also responsible
|
||||
// for sending the last SOA record (to signal end of the transfer). This plugin will just grab
|
||||
// these records and send them back to the requester, there is little validation done.
|
||||
//
|
||||
|
|
|
@ -260,7 +260,7 @@ func (w *testImportOrderingWalker) walk(path string, info os.FileInfo, _ error)
|
|||
}
|
||||
|
||||
// Ok, now that we have the type, let's see if all members adhere to it.
|
||||
// After that we check if the are in the right order.
|
||||
// After that we check if they are in the right order.
|
||||
for i := 0; i <= bl; i++ {
|
||||
for _, p := range blocks[i] {
|
||||
t := importtype(p.Path.Value)
|
||||
|
|
|
@ -40,7 +40,7 @@ func TestTsig(t *testing.T) {
|
|||
}
|
||||
tsig := r.IsTsig()
|
||||
if tsig == nil {
|
||||
t.Fatalf("Respose was not TSIG")
|
||||
t.Fatalf("Response was not TSIG")
|
||||
}
|
||||
if tsig.Error != dns.RcodeSuccess {
|
||||
t.Fatalf("TSIG Error code should be dns.RcodeSuccess")
|
||||
|
@ -70,7 +70,7 @@ func TestTsigBadKey(t *testing.T) {
|
|||
}
|
||||
tsig := r.IsTsig()
|
||||
if tsig == nil {
|
||||
t.Fatalf("Respose was not TSIG")
|
||||
t.Fatalf("Response was not TSIG")
|
||||
}
|
||||
if tsig.Error != dns.RcodeBadKey {
|
||||
t.Fatalf("TSIG Error code should be dns.RcodeBadKey")
|
||||
|
@ -109,7 +109,7 @@ func TestTsigBadSig(t *testing.T) {
|
|||
}
|
||||
tsig := r.IsTsig()
|
||||
if tsig == nil {
|
||||
t.Fatalf("Respose was not TSIG")
|
||||
t.Fatalf("Response was not TSIG")
|
||||
}
|
||||
if tsig.Error != dns.RcodeBadSig {
|
||||
t.Fatalf("TSIG Error code should be dns.RcodeBadSig")
|
||||
|
@ -149,7 +149,7 @@ func TestTsigBadTime(t *testing.T) {
|
|||
}
|
||||
tsig := r.IsTsig()
|
||||
if tsig == nil {
|
||||
t.Fatalf("Respose was not TSIG")
|
||||
t.Fatalf("Response was not TSIG")
|
||||
}
|
||||
if tsig.Error != dns.RcodeBadTime {
|
||||
t.Fatalf("TSIG Error code should be dns.RcodeBadTime")
|
||||
|
|
Loading…
Add table
Reference in a new issue