aboutsummaryrefslogtreecommitdiff
path: root/docs/src
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2020-05-29 10:17:32 +0200
committerSantiago Gimeno <santiago.gimeno@gmail.com>2021-02-17 10:29:53 +0100
commitc382d39a85c1edbaf96f0cd84385cd6549c0bde2 (patch)
tree41669e9bf5f0216ce845fe3de2d575557226726d /docs/src
parentc464d213231ea371c4e9bddaa6455cf8a426a0fe (diff)
downloadlibuv-c382d39a85c1edbaf96f0cd84385cd6549c0bde2.tar.gz
libuv-c382d39a85c1edbaf96f0cd84385cd6549c0bde2.zip
linux,udp: enable full ICMP error reporting
The Linux kernel suppresses some ICMP error messages by default for UDP sockets. This commit sets IP_RECVERR/IPV6_RECVERR on the socket to enable full ICMP error reporting, hopefully resulting in faster failover to working name servers. PR-URL: https://github.com/libuv/libuv/pull/2872 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Diffstat (limited to 'docs/src')
-rw-r--r--docs/src/udp.rst11
1 files changed, 10 insertions, 1 deletions
diff --git a/docs/src/udp.rst b/docs/src/udp.rst
index 827fbaad..3a7c6db4 100644
--- a/docs/src/udp.rst
+++ b/docs/src/udp.rst
@@ -54,6 +54,14 @@ Data types
*/
UV_UDP_MMSG_FREE = 16,
/*
+ * Indicates if IP_RECVERR/IPV6_RECVERR will be set when binding the handle.
+ * This sets IP_RECVERR for IPv4 and IPV6_RECVERR for IPv6 UDP sockets on
+ * Linux. This stops the Linux kernel from supressing some ICMP error messages
+ * and enables full ICMP error reporting for faster failover.
+ * This flag is no-op on platforms other than Linux.
+ */
+ UV_UDP_LINUX_RECVERR = 32,
+ /*
* Indicates that recvmmsg should be used, if available.
*/
UV_UDP_RECVMMSG = 256
@@ -178,7 +186,8 @@ API
with the address and port to bind to.
:param flags: Indicate how the socket will be bound,
- ``UV_UDP_IPV6ONLY`` and ``UV_UDP_REUSEADDR`` are supported.
+ ``UV_UDP_IPV6ONLY``, ``UV_UDP_REUSEADDR``, and ``UV_UDP_RECVERR``
+ are supported.
:returns: 0 on success, or an error code < 0 on failure.