Modify the rewrite plugin to write multiple EDNS0 options (#936) (#1096)

* Add processing mode

* Add processing mode

* Update UTs

* Update README.md

* Change to use the constant Stop

* Fix README per review comments
This commit is contained in:
Thong Huynh
2017-09-20 13:06:53 -07:00
committed by John Belamaric
parent 36c7aa6437
commit ec21f83425
7 changed files with 139 additions and 28 deletions

View File

@@ -8,7 +8,7 @@ Rewrites are invisible to the client. There are simple rewrites (fast) and compl
## Syntax
~~~
rewrite FIELD FROM TO
rewrite [continue|stop] FIELD FROM TO
~~~
* **FIELD** is (`type`, `class`, `name`, ...)
@@ -26,8 +26,11 @@ needs to be a full match of the name, e.g., `rewrite name miek.nl example.org`.
When the FIELD is `edns0` an EDNS0 option can be appended to the request as described below.
If you specify multiple rules and an incoming query matches on multiple (simple) rules, only
the first rewrite is applied.
If you specify multiple rules and an incoming query matches on multiple rules, the rewrite
will behave as following
* `continue` will continue apply the next rule in the rule list.
* `stop` will consider the current rule is the last rule and will not continue. Default behaviour
for not specifying this rule processing mode is `stop`
## EDNS0 Options