diff options
author | 2018-07-08 03:18:01 -0400 | |
---|---|---|
committer | 2018-07-08 08:18:01 +0100 | |
commit | 774546243036c52ff6e3ad524594e68b59c3a919 (patch) | |
tree | 22f466b2d07e92faf91d1eba7d7e716f7d6783c1 /plugin/rewrite/class.go | |
parent | 6ec1978340de48e25ff77b032040e0b39805d84c (diff) | |
download | coredns-774546243036c52ff6e3ad524594e68b59c3a919.tar.gz coredns-774546243036c52ff6e3ad524594e68b59c3a919.tar.zst coredns-774546243036c52ff6e3ad524594e68b59c3a919.zip |
plugin/rewrite - extend edns0 local variable support with metadata (#1928)
* - add support of metadata values for edns0 local variables
* - comments from review.
* - simplify label check. Add UT
* - enhance check for Labels, add UT
- remove IsMetadataSet
* - edns0 variable - if variable is not found just ignore the rewrite.
Diffstat (limited to 'plugin/rewrite/class.go')
-rw-r--r-- | plugin/rewrite/class.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin/rewrite/class.go b/plugin/rewrite/class.go index d72557884..dceb4429b 100644 --- a/plugin/rewrite/class.go +++ b/plugin/rewrite/class.go @@ -1,6 +1,7 @@ package rewrite import ( + "context" "fmt" "strings" @@ -29,7 +30,7 @@ func newClassRule(nextAction string, args ...string) (Rule, error) { } // Rewrite rewrites the the current request. -func (rule *classRule) Rewrite(state request.Request) Result { +func (rule *classRule) Rewrite(ctx context.Context, state request.Request) Result { if rule.fromClass > 0 && rule.toClass > 0 { if state.Req.Question[0].Qclass == rule.fromClass { state.Req.Question[0].Qclass = rule.toClass |