diff options
author | 2021-02-23 09:12:40 +0000 | |
---|---|---|
committer | 2021-02-23 10:12:40 +0100 | |
commit | 01039312635d2577ec08f6f426fa395f0ccca392 (patch) | |
tree | add615081f63ba971230c8d86e517c1d108a08c0 /plugin/test/helpers.go | |
parent | fe2b5f630d969bac5eda7b72e28f740e65778469 (diff) | |
download | coredns-01039312635d2577ec08f6f426fa395f0ccca392.tar.gz coredns-01039312635d2577ec08f6f426fa395f0ccca392.tar.zst coredns-01039312635d2577ec08f6f426fa395f0ccca392.zip |
Rewrite SRV targets and additional names in response (#4287)
* Rewrite plugin - rewrite SRV targets and names in response answer and additional records
Signed-off-by: Nic Colledge <nic@njcolledge.net>
* Added README content to describe new behaviour
Signed-off-by: Nic Colledge <nic@njcolledge.net>
* Added more record types to rewrite handling based on PR/Issue feedback
Signed-off-by: Nic Colledge <nic@njcolledge.net>
* Updated README.md for plugin
Signed-off-by: Nic Colledge <nic@njcolledge.net>
* Updated unit tests.
Small refactor of getTarget... function.
Signed-off-by: Nic Colledge <nic@njcolledge.net>
* Refactor to add response value rewrite as answer value option
Signed-off-by: Nic Colledge <nic@njcolledge.net>
* Removed TODO comment, added test for NAPTR record.
Signed-off-by: Nic Colledge <nic@njcolledge.net>
Diffstat (limited to 'plugin/test/helpers.go')
-rw-r--r-- | plugin/test/helpers.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugin/test/helpers.go b/plugin/test/helpers.go index fa89f9218..0c7e85f2a 100644 --- a/plugin/test/helpers.go +++ b/plugin/test/helpers.go @@ -99,6 +99,9 @@ func DNSKEY(rr string) *dns.DNSKEY { r, _ := dns.NewRR(rr); return r.(*dns.DNSKE // DS returns a DS record from rr. It panics on errors. func DS(rr string) *dns.DS { r, _ := dns.NewRR(rr); return r.(*dns.DS) } +// NAPTR returns a NAPTR record from rr. It panics on errors. +func NAPTR(rr string) *dns.NAPTR { r, _ := dns.NewRR(rr); return r.(*dns.NAPTR) } + // OPT returns an OPT record with UDP buffer size set to bufsize and the DO bit set to do. func OPT(bufsize int, do bool) *dns.OPT { o := new(dns.OPT) |