about summary refs log tree commit diff
path: root/resolv/resolv-internal.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-03-12 11:40:47 +0100
committerFlorian Weimer <fweimer@redhat.com>2019-03-12 11:40:47 +0100
commit08504de71813ddbd447bfbca4a325cbe8ce8bcda (patch)
tree220785321a7949a077d9ea8c381eb810430ccb09 /resolv/resolv-internal.h
parent5fbcd76351eeda3479175e2dce62b342f8964e86 (diff)
downloadglibc-08504de71813ddbd447bfbca4a325cbe8ce8bcda.tar.gz
glibc-08504de71813ddbd447bfbca4a325cbe8ce8bcda.tar.xz
glibc-08504de71813ddbd447bfbca4a325cbe8ce8bcda.zip
resolv: Enable full ICMP errors for UDP DNS sockets [BZ #24047]
The Linux kernel suppresses some ICMP error messages by default for
UDP sockets.  This commit enables full ICMP error reporting,
hopefully resulting in faster failover to working name servers.
Diffstat (limited to 'resolv/resolv-internal.h')
-rw-r--r--resolv/resolv-internal.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/resolv/resolv-internal.h b/resolv/resolv-internal.h
index 6ab8f2af09..1500adc607 100644
--- a/resolv/resolv-internal.h
+++ b/resolv/resolv-internal.h
@@ -100,4 +100,10 @@ libc_hidden_proto (__inet_pton_length)
 /* Called as part of the thread shutdown sequence.  */
 void __res_thread_freeres (void) attribute_hidden;
 
+/* The Linux kernel does not enable all ICMP messages on a UDP socket
+   by default.  A call this function enables full error reporting for
+   the socket FD.  FAMILY must be AF_INET or AF_INET6.  Returns 0 on
+   success, -1 on failure.  */
+int __res_enable_icmp (int family, int fd) attribute_hidden;
+
 #endif  /* _RESOLV_INTERNAL_H */