cURL / Mailing Lists / curl-library / Single Mail

curl-library

IPV6 platforms which lack of sa6->sin6_scope_id

From: Guenter Knauf <lists_at_gknw.net>
Date: Wed, 24 Dec 2008 03:53:04 +0100

Hi,
when I recently tried to compile curl 7.19.2 on my old Linux box with kernel
2.2.16 I found that the in6_addr struct of 2.2.x kernel lacks of the
sin6_scope_id member. Can we perhaps let configure check for sin6_scope_id
and define HAVE_SIN6_SCOPE_ID, and then use something like that in connect.c:

--- lib/connect.c.orig Thu Nov 6 22:30:18 2008
+++ lib/connect.c Mon Dec 15 05:10:51 2008
@@ -790,7 +790,7 @@
     /* no socket, no connection */
     return CURL_SOCKET_BAD;

-#ifdef ENABLE_IPV6
+#if defined(ENABLE_IPV6) && defined(HAVE_SIN6_SCOPE_ID)
   if (conn->scope && (addr.family == AF_INET6))
     sa6->sin6_scope_id = conn->scope;
 #endif

I admit that I have no sufficient knowledge about ipv6 to say that we can
simply ommit this part, and also have no ipv6 network in order to check if
curl then still works....

BTW. I found that old AIX 4.3.3 also lacks of sin6_scope_id member:
https://bugzilla.mindrot.org/show_bug.cgi?id=1491

Gün.
Received on 2008-12-24