diff options
author | 2018-07-20 19:45:17 +0100 | |
---|---|---|
committer | 2018-07-20 19:45:17 +0100 | |
commit | 84ec780ffcf7f4712184803c5ede2473957f0b66 (patch) | |
tree | f985e6da00800c03862feb3cae7279ab497ad01e /plugin/loop/README.md | |
parent | 547f15546563c9d8bb520218cd3c9161394d9d20 (diff) | |
download | coredns-84ec780ffcf7f4712184803c5ede2473957f0b66.tar.gz coredns-84ec780ffcf7f4712184803c5ede2473957f0b66.tar.zst coredns-84ec780ffcf7f4712184803c5ede2473957f0b66.zip |
New plugin: loop (#1989)
* New plugin: loop
Add a plugin that detects loops. It does this by sending an unique query
to our selves. If we see the query more than twice we stop the process.
If there isn't a loop, the plugin disables it self and becomes a noop
plugin.
Signed-off-by: Miek Gieben <miek@miek.nl>
Diffstat (limited to 'plugin/loop/README.md')
-rw-r--r-- | plugin/loop/README.md | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/plugin/loop/README.md b/plugin/loop/README.md new file mode 100644 index 000000000..0b02a5158 --- /dev/null +++ b/plugin/loop/README.md @@ -0,0 +1,40 @@ +# loop + +## Name + +*loop* - detect forwarding loops and halt the server. + +## Description + +The *loop* plugin will send a random query to ourselves and will then keep track of how many times +we see it. If we see it more than twice, we assume CoreDNS is looping and we halt the process. + +The plugin will try to send the query for up to 30 seconds. This is done to give CoreDNS enough time +to start up. Once a query has been successfully sent *loop* disables itself to prevent a query of +death. + +The query send is `<random number>.<random number>.zone` with type set to HINFO. + +## Syntax + +~~~ txt +loop +~~~ + +## Examples + +Start a server on the default port and load the *loop* and *forward* plugins. The *forward* plugin +forwards to it self. + +~~~ txt +. { + loop + forward . 127.0.0.1 +} +~~~ + +After CoreDNS has started it stops the process while logging: + +~~~ txt +plugin/loop: Seen "HINFO IN 5577006791947779410.8674665223082153551." more than twice, loop detected +~~~ |