← Commit list

bf5cc6ab8b

Daniel Stenberg
Daniel Stenberg
2026-06-25
SUCCESS Duration: 197s

Subject

curl-functions.m4: verify working RFC 4291 zero prefixed IPv4 - mapped format

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

m4/curl-functions.m4+16 -3
@@ -2324,7 +2324,6 @@ AC_DEFUN([CURL_CHECK_FUNC_INET_NTOP], [
ipv4a[2] = 0x64;
ipv4a[3] = 0x01;
ipv4a[4] = 0x01;
- /* - */
ipv4ptr = inet_ntop(AF_INET, ipv4a, ipv4res, sizeof(ipv4res));
if(!ipv4ptr)
return 1; /* fail */
@@ -2348,7 +2347,6 @@ AC_DEFUN([CURL_CHECK_FUNC_INET_NTOP], [
ipv6a[14] = 0x76;
ipv6a[15] = 0xc8;
ipv6a[25] = 0x01;
- /* - */
ipv6ptr = inet_ntop(AF_INET6, ipv6a, ipv6res, sizeof(ipv6res));
if(!ipv6ptr)
return 1; /* fail */
@@ -2358,7 +2356,22 @@ AC_DEFUN([CURL_CHECK_FUNC_INET_NTOP], [
return 1; /* fail */
if(memcmp(ipv6res, "fe80::214:4fff:fe0b:76c8", 24))
return 1; /* fail */
- /* - */
+
+ /* verify working RFC 4291 zero prefixed IPv4 - mapped format */
+ memset(ipv6a, 0, sizeof(ipv6a));
+ ipv6a[12] = 0x7f;
+ ipv6a[13] = 0x0;
+ ipv6a[14] = 0x0;
+ ipv6a[15] = 0x01;
+ ipv6ptr = inet_ntop(AF_INET6, ipv6a, ipv6res, sizeof(ipv6res));
+ if(!ipv6ptr)
+ return 1; /* fail */
+ if(ipv6ptr != ipv6res)
+ return 1; /* fail */
+ if(!ipv6ptr[0])
+ return 1; /* fail */
+ if(memcmp(ipv6res, "::127.0.0.1", 11))
+ return 1; /* fail */
return 0;
]])
],[