parent
6881d6d585
commit
3f47fc8ba4
28 changed files with 32 additions and 33 deletions
|
@ -9,7 +9,7 @@
|
|||
# make -f Makefile.fuzz forward
|
||||
#
|
||||
# Each plugin that wants to join the fuzzing fray only needs to add a fuzz.go that calls
|
||||
# the plugins's ServeDNS and used the plugin/pkg/fuzz for the Do function.
|
||||
# the plugin's ServeDNS and used the plugin/pkg/fuzz for the Do function.
|
||||
#
|
||||
# Installing go-fuzz is very tricky because it does not support Go modules, see the `Makefile`
|
||||
# for the current trickery. The following may do the trick:
|
||||
|
|
|
@ -259,7 +259,7 @@ func (s *Server) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg)
|
|||
// The type is DS, keep the handler, but keep on searching as maybe we are serving
|
||||
// the parent as well and the DS should be routed to it - this will probably *misroute* DS
|
||||
// queries to a possibly grand parent, but there is no way for us to know at this point
|
||||
// if there is an actually delegation from grandparent -> parent -> zone.
|
||||
// if there is an actual delegation from grandparent -> parent -> zone.
|
||||
// In all fairness: direct DS queries should not be needed.
|
||||
dshandler = h
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ Refused queries are properly logged and exported if metrics are enabled.
|
|||
* *auto*: numerous bugfixes.
|
||||
* *file*: fix data race in reload process and also reload a zone when it is `mv`ed (newly created) into place.
|
||||
Also rewrite the zone lookup algorithm and be more standards compliant, esp. in the area of DNSSEC, wildcards and empty-non-terminals; handle secure delegations.
|
||||
* *kubernetes*: vender the k8s dependency and updates to be compatible with Kubernetes 1.4 and 1.5.
|
||||
* *kubernetes*: vendor the k8s dependency and updates to be compatible with Kubernetes 1.4 and 1.5.
|
||||
Multiple cleanups and fixes. Kubernetes services can now be resolved.
|
||||
|
||||
# Contributors
|
||||
|
|
|
@ -27,7 +27,7 @@ kernels.
|
|||
|
||||
* [*cache*](/plugins/cache) got some minor optimizations.
|
||||
|
||||
* [*errors*](/plugins/errors) (and *log*) gotten a new option (`consolidate`) to suppress loging.
|
||||
* [*errors*](/plugins/errors) (and *log*) gotten a new option (`consolidate`) to suppress logging.
|
||||
|
||||
* [*hosts*](/plugins/hosts) will now read the `hosts` file without holding a write lock.
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ Mostly documentation updates in various plugins. Plus a small fix where we stop
|
|||
|
||||
* [*log*](/plugins/log) now allows multiple names to be specified.
|
||||
|
||||
* [*import*](/plugins/import) was added to give it a README.md to make it's documentation more
|
||||
* [*import*](/plugins/import) was added to give it a README.md to make its documentation more
|
||||
discoverable.
|
||||
|
||||
* [*kubernetes*](/plugins/kubernetes) `TTL` is also applied to negative responses (NXDOMAIN, etc).
|
||||
|
|
|
@ -12,7 +12,7 @@ The CoreDNS team has released
|
|||
|
||||
This is a bug fix release, but it also features a new plugin called [*azure*](/plugins/azure).
|
||||
|
||||
It's compiled with Go 1.12.8 that incorperates fixes for HTTP/2 that may impact you if you use
|
||||
It's compiled with Go 1.12.8 that incorporates fixes for HTTP/2 that may impact you if you use
|
||||
[DoH](https://tools.ietf.org/html/rfc8484).
|
||||
|
||||
# Plugins
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"github.com/coredns/coredns/plugin/file"
|
||||
)
|
||||
|
||||
// Zones maps zone names to a *Zone. This keep track of what we zones we have loaded at
|
||||
// Zones maps zone names to a *Zone. This keeps track of what zones we have loaded at
|
||||
// any one time.
|
||||
type Zones struct {
|
||||
Z map[string]*file.Zone // A map mapping zone (origin) to the Zone's data.
|
||||
|
@ -56,7 +56,7 @@ func (z *Zones) Add(zo *file.Zone, name string) {
|
|||
z.Unlock()
|
||||
}
|
||||
|
||||
// Remove removes the zone named name from z. It also stop the zone's reload goroutine.
|
||||
// Remove removes the zone named name from z. It also stops the zone's reload goroutine.
|
||||
func (z *Zones) Remove(name string) {
|
||||
z.Lock()
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ Package autopath implements autopathing. This is a hack; it shortcuts the
|
|||
client's search path resolution by performing these lookups on the server...
|
||||
|
||||
The server has a copy (via AutoPathFunc) of the client's search path and on
|
||||
receiving a query it first establish if the suffix matches the FIRST configured
|
||||
receiving a query it first establishes if the suffix matches the FIRST configured
|
||||
element. If no match can be found the query will be forwarded up the plugin
|
||||
chain without interference (iff 'fallthrough' has been set).
|
||||
|
||||
|
|
|
@ -206,7 +206,7 @@ func (h *Azure) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg)
|
|||
return plugin.NextOrFailure(h.Name(), h.Next, ctx, w, r)
|
||||
}
|
||||
|
||||
zones, ok := h.zones[zone] // ok true if we are authoritive for the zone.
|
||||
zones, ok := h.zones[zone] // ok true if we are authoritative for the zone.
|
||||
if !ok || zones == nil {
|
||||
return dns.RcodeServerFailure, nil
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
## Description
|
||||
|
||||
This is useful for retrieving version or author information from the server by querying a TXT record
|
||||
for a special domainname in the CH class.
|
||||
for a special domain name in the CH class.
|
||||
|
||||
## Syntax
|
||||
|
||||
|
|
|
@ -55,7 +55,6 @@ func TestLookupEnt(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
// fdjfdjkf
|
||||
const dbMiekENTNL = `; File written on Sat Apr 2 16:43:11 2016
|
||||
; dnssec_signzone version 9.10.3-P4-Ubuntu
|
||||
miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. (
|
||||
|
|
|
@ -69,7 +69,7 @@ func (z *Zone) Lookup(ctx context.Context, state request.Request, qname string)
|
|||
//
|
||||
// Main for-loop handles delegation and finding or not finding the qname.
|
||||
// If found we check if it is a CNAME/DNAME and do CNAME processing
|
||||
// We also check if we have type and do a nodata resposne.
|
||||
// We also check if we have type and do a nodata response.
|
||||
//
|
||||
// If not found, we check the potential wildcard, and use that for further processing.
|
||||
// If not found and no wildcard we will process this as an NXDOMAIN response.
|
||||
|
@ -169,7 +169,7 @@ func (z *Zone) Lookup(ctx context.Context, state request.Request, qname string)
|
|||
return nil, ret, nil, NoData
|
||||
}
|
||||
|
||||
// Additional section processing for MX, SRV. Check response and see if any of the names are in baliwick -
|
||||
// Additional section processing for MX, SRV. Check response and see if any of the names are in bailiwick -
|
||||
// if so add IP addresses to the additional section.
|
||||
additional := z.additionalProcessing(rrs, do)
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ net {
|
|||
}
|
||||
~~~
|
||||
|
||||
Doing this is supported but both endponts ":8080" and ":8081" will export the exact same health.
|
||||
Doing this is supported but both endpoints ":8080" and ":8081" will export the exact same health.
|
||||
|
||||
## Metrics
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ func (k *Kubernetes) External(state request.Request) ([]msg.Service, int) {
|
|||
if last < 0 {
|
||||
return nil, dns.RcodeServerFailure
|
||||
}
|
||||
// We dealing with a fairly normal domain name here, but; we still need to have the service
|
||||
// We are dealing with a fairly normal domain name here, but we still need to have the service
|
||||
// and the namespace:
|
||||
// service.namespace.<base>
|
||||
//
|
||||
|
@ -86,7 +86,7 @@ func (k *Kubernetes) External(state request.Request) ([]msg.Service, int) {
|
|||
// ExternalAddress returns the external service address(es) for the CoreDNS service.
|
||||
func (k *Kubernetes) ExternalAddress(state request.Request) []dns.RR {
|
||||
// This is probably wrong, because of all the fallback behavior of k.nsAddr, i.e. can get
|
||||
// an address that isn't reacheable from outside the cluster.
|
||||
// an address that isn't reachable from outside the cluster.
|
||||
rrs := []dns.RR{k.nsAddr()}
|
||||
return rrs
|
||||
}
|
||||
|
|
|
@ -179,7 +179,7 @@ func (k *Kubernetes) getClientConfig() (*rest.Config, error) {
|
|||
}
|
||||
|
||||
// Connect to API from out of cluster
|
||||
// Only the first one is used. We will deprecated multiple endpoints later.
|
||||
// Only the first one is used. We will deprecate multiple endpoints later.
|
||||
clusterinfo.Server = k.APIServerList[0]
|
||||
|
||||
if len(k.APICertAuth) > 0 {
|
||||
|
|
|
@ -62,7 +62,7 @@ func ToEndpoints(obj interface{}) interface{} {
|
|||
Addresses: make([]EndpointAddress, len(eps.Addresses)),
|
||||
}
|
||||
if len(eps.Ports) == 0 {
|
||||
// Add sentinal if there are no ports.
|
||||
// Add sentinel if there are no ports.
|
||||
sub.Ports = []EndpointPort{{Port: -1}}
|
||||
} else {
|
||||
sub.Ports = make([]EndpointPort, len(eps.Ports))
|
||||
|
|
|
@ -184,7 +184,7 @@ func ParseStanza(c *caddy.Controller) (*Kubernetes, error) {
|
|||
case "endpoint":
|
||||
args := c.RemainingArgs()
|
||||
if len(args) > 0 {
|
||||
// Multiple endoints are deprecated but still could be specified,
|
||||
// Multiple endpoints are deprecated but still could be specified,
|
||||
// only the first one be used, though
|
||||
k8s.APIServerList = args
|
||||
if len(args) > 1 {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
By enabling *metadata* any plugin that implements [metadata.Provider
|
||||
interface](https://godoc.org/github.com/coredns/coredns/plugin/metadata#Provider) will be called for
|
||||
each DNS query, at beginning of the process for that query, in order to add it's own meta data to
|
||||
each DNS query, at beginning of the process for that query, in order to add its own meta data to
|
||||
context.
|
||||
|
||||
The meta data collected will be available for all plugins, via the Context parameter provided in the
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
|
||||
// See core/dnsserver/address.go - we should unify these two impls.
|
||||
|
||||
// Zones respresents a lists of zone names.
|
||||
// Zones represents a lists of zone names.
|
||||
type Zones []string
|
||||
|
||||
// Matches checks if qname is a subdomain of any of the zones in z. The match
|
||||
|
@ -65,7 +65,7 @@ func (h Host) Normalize() string {
|
|||
s := string(h)
|
||||
_, s = parse.Transport(s)
|
||||
|
||||
// The error can be ignore here, because this function is called after the corefile has already been vetted.
|
||||
// The error can be ignored here, because this function is called after the corefile has already been vetted.
|
||||
host, _, _, _ := SplitHostPort(s)
|
||||
return Name(host).Normalize()
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ func (h Host) Normalize() string {
|
|||
func SplitHostPort(s string) (host, port string, ipnet *net.IPNet, err error) {
|
||||
// If there is: :[0-9]+ on the end we assume this is the port. This works for (ascii) domain
|
||||
// names and our reverse syntax, which always needs a /mask *before* the port.
|
||||
// So from the back, find first colon, and then check if its a number.
|
||||
// So from the back, find first colon, and then check if it's a number.
|
||||
host = s
|
||||
|
||||
colon := strings.LastIndex(s, ":")
|
||||
|
|
|
@ -15,7 +15,7 @@ const (
|
|||
NoError Type = iota
|
||||
// NameError is a NXDOMAIN in header, SOA in auth.
|
||||
NameError
|
||||
// ServerError is a set of errors we want to cache, for now it containers SERVFAIL and NOTIMPL.
|
||||
// ServerError is a set of errors we want to cache, for now it contains SERVFAIL and NOTIMPL.
|
||||
ServerError
|
||||
// NoData indicates name found, but not the type: NOERROR in header, SOA in auth.
|
||||
NoData
|
||||
|
|
|
@ -49,7 +49,7 @@ func TestTypifyRRSIG(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestTypifyImpossible(t *testing.T) {
|
||||
// create impossible message that denies it's own existence
|
||||
// create impossible message that denies its own existence
|
||||
m := new(dns.Msg)
|
||||
m.SetQuestion("bar.www.example.org.", dns.TypeAAAA)
|
||||
m.Rcode = dns.RcodeNameError // name does not exist
|
||||
|
|
|
@ -84,7 +84,7 @@ func NextOrFailure(name string, next Handler, ctx context.Context, w dns.Respons
|
|||
}
|
||||
|
||||
// ClientWrite returns true if the response has been written to the client.
|
||||
// Each plugin to adhire to this protocol.
|
||||
// Each plugin to adhere to this protocol.
|
||||
func ClientWrite(rcode int) bool {
|
||||
switch rcode {
|
||||
case dns.RcodeServerFailure:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Package pprof implement a debug endpoint for getting profiles using the
|
||||
// Package pprof implements a debug endpoint for getting profiles using the
|
||||
// go pprof tooling.
|
||||
package pprof
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ will not be queried again.
|
|||
|
||||
Each Server Block that enables the *ready* plugin will have the plugins *in that server block*
|
||||
report readiness into the /ready endpoint that runs on the same port. This also means that the
|
||||
*same* plugin with different configurations (in potentialy *different* Server Blocks) will have
|
||||
*same* plugin with different configurations (in potentially *different* Server Blocks) will have
|
||||
their readiness reported as the union of their respective readinesses.
|
||||
|
||||
## Syntax
|
||||
|
|
|
@ -85,7 +85,7 @@ is already listening on that port. The process reloads and performs the followin
|
|||
4. fail loading the new Corefile, abort and keep using the old process
|
||||
|
||||
After the aborted attempt to reload we are left with the old processes running, but the listener is
|
||||
closed in step 1; so the health endpoint is broken. The same can hopen in the prometheus metrics plugin.
|
||||
closed in step 1; so the health endpoint is broken. The same can happen in the prometheus metrics plugin.
|
||||
|
||||
In general be careful with assigning new port and expecting reload to work fully.
|
||||
|
||||
|
|
|
@ -421,7 +421,7 @@ func TestHandler(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
// TestMultiSection verfies that a corefile with multiple but different template sections works
|
||||
// TestMultiSection verifies that a corefile with multiple but different template sections works
|
||||
func TestMultiSection(t *testing.T) {
|
||||
ctx := context.TODO()
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"github.com/miekg/dns"
|
||||
)
|
||||
|
||||
// Using miek.nl here because this is the easiest zone to get access to and it's masters
|
||||
// Using miek.nl here because this is the easiest zone to get access to and its masters
|
||||
// run both NSD and BIND9, making checks like "what should we actually return" super easy.
|
||||
var dsTestCases = []mtest.Case{
|
||||
{
|
||||
|
|
|
@ -71,7 +71,7 @@ func TestSecondaryZoneTransfer(t *testing.T) {
|
|||
m.SetQuestion("example.org.", dns.TypeSOA)
|
||||
|
||||
var r *dns.Msg
|
||||
// This is now async; we we need to wait for it to be transferred.
|
||||
// This is now async; we need to wait for it to be transferred.
|
||||
for i := 0; i < 10; i++ {
|
||||
r, err = dns.Exchange(m, udp)
|
||||
if len(r.Answer) != 0 {
|
||||
|
|
Loading…
Add table
Reference in a new issue