coredns/plugin/transfer
Miek Gieben 5f41d8eb1f
reverse zone: fix Normalize (#4621)
Make normalize return multiple "hosts" (= reverse zones) when a
non-octet boundary cidr is given.

Added pkg/cidr package that holds the cidr calculation routines; felt
they didn't really fit dnsutil.

This change means the IPNet return parameter isn't needed, the hosts are
all correct. The tests that tests this is also removed: TestSplitHostPortReverse
The fallout was that zoneAddr _also_ doesn't need the IPNet member, that
in turn make it visible that zoneAddr in address.go duplicated a bunch
of stuff from register.go; removed/refactored that too.

Created a plugin.OriginsFromArgsOrServerBlock to help plugins do the
right things, by consuming ZONE arguments; this now expands reverse
zones correctly. This is mostly mechanical.

Remove the reverse test in plugin/kubernetes which is a copy-paste from
a core test (which has since been fixed).

Remove MustNormalize as it has no plugin users.

This change is not backwards compatible to plugins that have a ZONE
argument that they parse in the setup util.

All in-tree plugins have been updated.

Signed-off-by: Miek Gieben <miek@miek.nl>
2021-05-17 13:19:54 -07:00
..
failed_write_test.go plugin/transfer: only allow outgoing axfr over tcp (#4452) 2021-02-05 10:51:29 +01:00
notify.go Cherry-pick: Implement notifies for transfer plugin (#3972) (#4142) 2020-09-24 20:30:39 +02:00
README.md Cherry-pick: Implement notifies for transfer plugin (#3972) (#4142) 2020-09-24 20:30:39 +02:00
select_test.go plugin/transfer: only allow outgoing axfr over tcp (#4452) 2021-02-05 10:51:29 +01:00
setup.go reverse zone: fix Normalize (#4621) 2021-05-17 13:19:54 -07:00
setup_test.go Cherry-pick: Implement notifies for transfer plugin (#3972) (#4142) 2020-09-24 20:30:39 +02:00
transfer.go plugin/transfer: only allow outgoing axfr over tcp (#4452) 2021-02-05 10:51:29 +01:00
transfer_test.go plugin/transfer: only allow outgoing axfr over tcp (#4452) 2021-02-05 10:51:29 +01:00

transfer

Name

transfer - perform (outgoing) zone transfers for other plugins.

Description

This plugin answers zone transfers for authoritative plugins that implement transfer.Transferer.

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

When a plugin wants to notify it's secondaries it will call back into the transfer plugin.

The following plugins implement zone transfers using this plugin: file, auto, secondary, and kubernetes. See transfer.go for implementation details if you are a plugin author that wants to use this plugin.

Syntax

transfer [ZONE...] {
  to ADDRESS...
}
  • ZONE The zones transfer will answer zone transfer 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 ADDRESS... The hosts transfer will transfer to. Use * to permit transfers to all addresses. ADDRESS must be denoted in CIDR notation (e.g., 127.0.0.1/32) or just as plain addresses. to may be specified multiple times.

Examples

See the specific plugins using this plugin for examples on it's usage.