Reputation: 2294
The only other thread I could find on this topic (which didn't really help) was this:
https://github.com/curl/curl/issues/594
I'm using libcurl to make API calls to a server. It works fine with IPv4 but as soon as I switch to using WiFi over a IPv6 network, I get a CURL_COULDNT_CONNECT
.
I tried to debug to get extra info doing this:
curl_easy_setopt( m_curl, CURL_VERBOSE, 1L );
curl_easy_setopt( m_curl, CURLOPT_DEBUGFUNCTION, my_trace );
Question 1: Is there another way to get more verbose output than checking data
in my_trace(CURL* handle, curl_infotype type, char* data, size_t size, void* userp )
?
Question2: Checking data
above gives me this: "Immediate connect fail for aa.bb.cc.dd: Network is unreachable\n"
, where the aa.bb.. is some IP. Why does it fail with IPv6?
Upvotes: 0
Views: 892
Reputation: 12405
"Immediate connect fail for aa.bb.cc.dd" because this is an IPv4 address not an IPV6 address (which will look like aa:bb::cc:dd:... ) You need to use NAT64 to get the IPv6 address first then connect to that address
Upvotes: 2