]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Disable pktinfo for ipv6 on all unices
authorWitold Kręcicki <wpk@isc.org>
Mon, 13 Jan 2020 19:22:23 +0000 (20:22 +0100)
committerWitold Kręcicki <wpk@isc.org>
Mon, 13 Jan 2020 21:00:20 +0000 (22:00 +0100)
If pktinfo were supported then we could listen on :: for ipv6 and get
the information about the destination address from pktinfo structure passed
in recvmsg but this method is not portable and libuv doesn't support it - so
we need to listen on all interfaces.
We should verify that this doesn't impact performance (we already do it for
ipv4) and either remove all the ipv6pktinfo detection code or think of fixing
libuv.

lib/isc/unix/net.c

index c2573bd381beeee773155188e1399fc9247023d4..8613b827dab2160d7c261a8bab616134f9fcc684 100644 (file)
@@ -90,7 +90,9 @@
 #endif /* HAVE_SYSCTLBYNAME */
 
 static isc_once_t      once_ipv6only = ISC_ONCE_INIT;
+#ifdef __notyet__
 static isc_once_t      once_ipv6pktinfo = ISC_ONCE_INIT;
+#endif
 
 #ifndef ISC_CMSG_IP_TOS
 #ifdef __APPLE__
@@ -284,6 +286,7 @@ initialize_ipv6only(void) {
                                  try_ipv6only) == ISC_R_SUCCESS);
 }
 
+#ifdef __notyet__
 static void
 try_ipv6pktinfo(void) {
        int s, on;
@@ -331,6 +334,7 @@ initialize_ipv6pktinfo(void) {
        RUNTIME_CHECK(isc_once_do(&once_ipv6pktinfo,
                                  try_ipv6pktinfo) == ISC_R_SUCCESS);
 }
+#endif
 
 isc_result_t
 isc_net_probe_ipv6only(void) {
@@ -340,7 +344,18 @@ isc_net_probe_ipv6only(void) {
 
 isc_result_t
 isc_net_probe_ipv6pktinfo(void) {
+/*
+ * XXXWPK if pktinfo were supported then we could listen on :: for ipv6 and get
+ * the information about the destination address from pktinfo structure passed
+ * in recvmsg but this method is not portable and libuv doesn't support it - so
+ * we need to listen on all interfaces.
+ * We should verify that this doesn't impact performance (we already do it for
+ * ipv4) and either remove all the ipv6pktinfo detection code from above
+ * or think of fixing libuv.
+ */
+#ifdef __notyet__
        initialize_ipv6pktinfo();
+#endif
        return (ipv6pktinfo_result);
 }