mirror of
https://github.com/coredns/coredns.git
synced 2025-12-19 16:45:11 -05:00
Add set EDNS0 with variable substitution (#937)
* Add set EDNS0 with variable substitution
* Change variable from $ to {}. Un-export constants
* Update README
* Change getRuleData() to ruleData(); Change to use string match from regexp
This commit is contained in:
@@ -24,7 +24,7 @@ func newClassRule(fromS, toS string) (Rule, error) {
|
||||
}
|
||||
|
||||
// Rewrite rewrites the the current request.
|
||||
func (rule *classRule) Rewrite(r *dns.Msg) Result {
|
||||
func (rule *classRule) Rewrite(w dns.ResponseWriter, r *dns.Msg) Result {
|
||||
if rule.fromClass > 0 && rule.toClass > 0 {
|
||||
if r.Question[0].Qclass == rule.fromClass {
|
||||
r.Question[0].Qclass = rule.toClass
|
||||
|
||||
Reference in New Issue
Block a user