diff options
author | 2016-04-03 09:02:34 +0100 | |
---|---|---|
committer | 2016-04-03 09:02:34 +0100 | |
commit | f58f1e4285ab9725a317ac7b38f5905fb497c7b0 (patch) | |
tree | b44eead7ca9f687bea1813cfe7247123d8929026 /middleware/file/xfr.go | |
parent | 7fb959470e95517967c4f0bcf85f1adf9a77a42f (diff) | |
download | coredns-f58f1e4285ab9725a317ac7b38f5905fb497c7b0.tar.gz coredns-f58f1e4285ab9725a317ac7b38f5905fb497c7b0.tar.zst coredns-f58f1e4285ab9725a317ac7b38f5905fb497c7b0.zip |
Add secondary support
Allow specifying a primary server and retrieve the zone's content.
Add tests and an Expired bool to zone struct, to stop server zones
that are expired. The zone is retrieved on Startup, no updates of
changed content are done. We also don't respond to notifies yet.
Diffstat (limited to 'middleware/file/xfr.go')
-rw-r--r-- | middleware/file/xfr.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/middleware/file/xfr.go b/middleware/file/xfr.go index 297de2fc5..5ef205f6e 100644 --- a/middleware/file/xfr.go +++ b/middleware/file/xfr.go @@ -22,7 +22,7 @@ func (x Xfr) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (in return dns.RcodeServerFailure, nil } if state.QType() != dns.TypeAXFR { - return 0, fmt.Errorf("file: xfr called with non xfr type: %d", state.QType()) + return 0, fmt.Errorf("file: xfr called with non transfer type: %d", state.QType()) } if state.Proto() == "udp" { return 0, fmt.Errorf("file: xfr called with udp") @@ -39,7 +39,7 @@ func (x Xfr) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (in go tr.Out(w, r, ch) j, l := 0, 0 - records = append(records, records[0]) + records = append(records, records[0]) // add closing SOA to the end for i, r := range records { l += dns.Len(r) if l > transferLength { |