]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
doc: document freebind option for net.listen()
authorTomas Krizek <tomas.krizek@nic.cz>
Fri, 29 Nov 2019 15:19:10 +0000 (16:19 +0100)
committerPetr Špaček <petr.spacek@nic.cz>
Fri, 20 Dec 2019 14:13:47 +0000 (15:13 +0100)
NEWS
daemon/bindings/net.rst

diff --git a/NEWS b/NEWS
index 6379783db91c5dddc24c1136427ce46abde448fc..a4753682b46c7a17294b8e5790146653a40b340b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,11 +1,11 @@
-(??)
-================================
+Knot Resolver 4.x.y (20yy-mm-dd)
 
 Improvements
 ------------
 - logging: control-socket commands don't log unless --verbose (#528)
 - use SO_REUSEPORT_LB if available (FreeBSD 12.0+)
 - lua: remove dependency on lua-socket and lua-sec, used lua-http and cqueues (#512, #521, !894)
+- net.listen(): allow binding to non-local address with freebind option (!898)
 
 
 Knot Resolver 4.3.0 (2019-12-04)
index 5dcaeacdc78e3fd6b9f8cb47a4d06ef6df92a0a4..e8486a355b07b2e14d866eef3f13debbadd6a891 100644 (file)
@@ -166,7 +166,7 @@ file, otherwise the socket won't work.
 If you don't use systemd with sockets to run kresd, addresses and ports to listen
 on are configured in the config file.
 
-.. function:: net.listen(addresses, [port = 53, { kind = 'dns' }])
+.. function:: net.listen(addresses, [port = 53, { kind = 'dns', freebind = false }])
 
    :return: boolean
 
@@ -175,6 +175,7 @@ on are configured in the config file.
    The command can be given multiple times,
    but repeating an address-port combination is an error.
    Port 853 implies ``kind = 'tls'`` but it is always better to be explicit.
+   Freebind allows binding to a non-local or not yet available address.
 
 .. csv-table::
   :header: "**Network protocol**", "**Configuration command**"
@@ -192,6 +193,7 @@ Examples:
        net.listen('::1')
        net.listen(net.lo, 53)
        net.listen(net.eth0, 853, { kind = 'tls' })
+       net.listen('192.0.2.1', 53, { freebind = true })
        net.listen('::', 443, { kind = 'doh' }) -- see http module
        net.listen('::', 8453, { kind = 'webmgmt' }) -- see http module
        net.listen('/tmp/kresd-socket', nil, { kind = 'webmgmt' }) -- http module supports AF_UNIX