]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
sortlist docs
authorbert hubert <bert.hubert@netherlabs.nl>
Mon, 30 Nov 2015 18:36:06 +0000 (19:36 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Mon, 30 Nov 2015 18:36:06 +0000 (19:36 +0100)
docs/markdown/recursor/settings.md

index 8e6225d1580ec959a92a714ef11f487ff4a0010b..732c7c6d4287067581371e674c24e9faf038864e 100644 (file)
@@ -359,6 +359,51 @@ Some DNS errors occur rather frequently and are no cause for alarm.
 If set to a digit, logging is performed under this LOCAL facility. See
 [Logging](../common/logging.md#logging). Do not pass names like 'local0'!
 
+## `lua-config-file`
+* Filename
+* Available since 4.0.0
+
+If set, and Lua support is compiled in, this will load an additional configuration file
+for newer features and more complicated setups. Currently the only supported additional feature is:
+
+### `addSortList`
+Sortlist is a complicated feature which allows for the ordering of A and
+AAAA records in answers to be modified, optionally dependently on who is
+asking. Since clients frequently connect to the 'first' IP address they see,
+this can effectively allow you to make sure that user from, say 10.0.0.0/8
+also preferrably connect to servers in 10.0.0.0/8.
+
+The syntax consists of a netmask for which this ordering instruction
+applies, followed by a set of netmask (groups) which describe the desired
+ordering. So an ordering instruction of "1.0.0.0/8", "2.0.0.0/8" will put
+anything within 1/8 first, and anything in 2/8 second. Other IP addresses
+would follow behind the addresses sorted earlier.
+
+If netmasks are grouped, this means these get equal ordering.
+
+`addSortList()` is intended to exactly mirror the semantics of the BIND
+sortlist option, but the syntax is slightly different.
+
+As an example, the following BIND sortlist:
+
+```
+{ 17.50.0.0/16; {17.238.240.0/24; 17.138.149.200;
+{17.218.242.254; 17.218.252.254;}; 17.38.42.80;
+17.208.240.100; }; };
+```
+
+Gets transformed into:
+
+```
+addSortList("17.50.0.0/16", {"17.238.240.0/24", "17.138.149.200",
+{"17.218.242.254", "17.218.252.254"}, "17.38.42.80", 
+"17.208.240.100" })
+```
+
+In other words: each IP address is put within quotes, and are separated by
+commas instead of semicolons. For the rest everything is identical.
+
+
 ## `lua-dns-script`
 * Path
 * Default: unset