Add NSID plugin support for CoreDNS (#1273)

* Add NSID plugin support for CoreDNS

This fix adds NSID plugin support for CoreDNS, as was proposed
in 1256.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Add test cases for NSID plugin

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Generate code for NSID plugin

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Use hostname as the default (as with bind), and remove unneeded copy

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Add README.md

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
Yong Tang
2017-12-04 08:28:27 -08:00
committed by GitHub
parent a04eeb9c73
commit b52c3418b2
8 changed files with 263 additions and 0 deletions

27
plugin/nsid/README.md Normal file
View File

@@ -0,0 +1,27 @@
# nsid
*nsid* add an identifier of this server to each reply.
This plugin implements RFC 5001 and adds an EDNS0 OPT resource record to replies that uniquely
identifies the server. This can be useful in anycast setups to see which server was responsible for
generating the reply and for debugging.
## Syntax
~~ txt
nsid [DATA]
~~
**DATA** is the string to use in the nsid record.
If **DATA** is not given, the host's name is used.
## Examples
Enable nsid:
~~ corefile
. {
nsid
}
~~