doc update (#1140)

* doc update

Go through all README and fix mistakes, extend example and let more
corefile snippets be test for validity.

* Cant use spefic addr in test
This commit is contained in:
Miek Gieben
2017-10-10 09:39:35 +02:00
committed by GitHub
parent 7c6ba3fcbd
commit 427aed6f5b
17 changed files with 112 additions and 88 deletions

View File

@@ -48,14 +48,19 @@ This has two fields, code and data. A match is defined as having the same code.
* A string data can be treated as hex if it starts with `0x`. Example:
~~~
rewrite edns0 local set 0xffee 0x61626364
~~~ corefile
. {
rewrite edns0 local set 0xffee 0x61626364
whoami
}
~~~
rewrites the first local option with code 0xffee, setting the data to "abcd". Equivalent:
~~~
rewrite edns0 local set 0xffee abcd
~~~ corefile
. {
rewrite edns0 local set 0xffee abcd
}
~~~
* A variable data is specified with a pair of curly brackets `{}`. Following are the supported variables:
@@ -86,9 +91,8 @@ length is used to extract the client subnet from the source IP address in the qu
Example:
~~~
rewrite edns0 subnet set 24 56
rewrite edns0 subnet set 24 56
~~~
* If the query has source IP as IPv4, the first 24 bits in the IP will be the network subnet.
* If the query has source IP as IPv6, the first 56 bits in the IP will be the network subnet.