transfer

package
v1.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

README

transfer

Name

transfer - perform zone transfers for other plugins.

Description

This plugin answers zone transfers for authoritative plugins that implement transfer.Transferer. Currently, no internal plugins implement this interface.

Transfer answers full zone transfer (AXFR) requests and incremental zone transfer (IXFR) requests with AXFR fallback if the zone has changed.

Notifies are not currently supported.

Syntax

transfer [ZONE...] {
  to HOST...
}
  • ZONES The zones transfer will answer zone requests for. If left blank, the zones are inherited from the enclosing server block. To answer zone transfers for a given zone, there must be another plugin in the same server block that serves the same zone, and implements transfer.Transferer.

  • to HOST... The hosts transfer will transfer to. Use * to permit transfers to all hosts.

Examples

TODO

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotAuthoritative is returned by Transfer() when the plugin is not authoritative for the zone
	ErrNotAuthoritative = errors.New("not authoritative for zone")
)

Functions

This section is empty.

Types

type Transfer

type Transfer struct {
	Transferers []Transferer // the list of plugins that implement Transferer

	Next plugin.Handler // the next plugin in the chain
	// contains filtered or unexported fields
}

Transfer is a plugin that handles zone transfers.

func (Transfer) Name

func (Transfer) Name() string

Name implements the Handler interface.

func (Transfer) ServeDNS

func (t Transfer) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error)

ServeDNS implements the plugin.Handler interface.

type Transferer

type Transferer interface {
	// Transfer returns a channel to which it writes responses to the transfer request.
	// If the plugin is not authoritative for the zone, it should immediately return the
	// Transfer.ErrNotAuthoritative error.
	//
	// 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.
	//
	// If serial is not 0, handle as an IXFR request. If the serial is equal to or greater (newer) than
	// the current serial for the zone, send a single SOA record to the channel.
	// If the serial is less (older) than the current serial for the zone, perform an AXFR fallback
	// by proceeding as if an AXFR was requested (as above).
	Transfer(zone string, serial uint32) (<-chan []dns.RR, error)
}

Transferer may be implemented by plugins to enable zone transfers

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL