From: Tomas Krizek Date: Fri, 29 Nov 2019 15:19:10 +0000 (+0100) Subject: doc: document freebind option for net.listen() X-Git-Tag: v5.0.0~16^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c81cfd62aa00981ecb55ffc5e5b333cf5325b801;p=thirdparty%2Fknot-resolver.git doc: document freebind option for net.listen() --- diff --git a/NEWS b/NEWS index 6379783db..a4753682b 100644 --- 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) diff --git a/daemon/bindings/net.rst b/daemon/bindings/net.rst index 5dcaeacdc..e8486a355 100644 --- a/daemon/bindings/net.rst +++ b/daemon/bindings/net.rst @@ -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