|
|
cURL Mailing List Monthly Index Single Mail
curl-tracker Archives
[ curl-Bugs-3154436 ] TFTP GET works with IP addr but not with resolvable hostname
From: SourceForge.net <noreply_at_sourceforge.net>
Date: Mon, 10 Jan 2011 23:22:43 +0000
Bugs item #3154436, was opened at 2011-01-10 18:01
Please note that this message will contain a full copy of the comment thread,
Initial Comment:
Version: curl 7.21.3 (armv5-unknown-linux-gnu) libcurl/7.21.3 OpenSSL/0.9.7e zlib/1.2.1.1
The problem is this, ALTHOUGH tftp.c sets the "conn->socktype" explicitly to SOCK_DGRAM anticipating a UDP connection, hostip4.c[Curl_ipv4_resolve_r()] explicitly sets the hints.ai_socktype to SOCK_STREAM and passes that to Curl_getaddrinfo_ex() which results in the Curl_addrinfo->ai_protocol = IPPROTO_TCP. When connect.c[singleipconnect()) trys to create a socket it fails because ai_socktype is SOCK_DGRAM, but ai_protoco is IPPROTO_TCP.
I guess it worked when using an IP address because it doesn't go through all of the resolver stuff and so ai_protocol didn't get set to IPPROTO_TCP and remained IPPROTO_IP (which is '0')
This problem may be specific to the arm or the ancient montavista toolchain that I'm using to compile -- however, I've seen references that others have had this problem.
this patch fixed my problem:
*** connect.c 4 Jan 2011 21:38:42 -0000 1.1
----------------------------------------------------------------------
>Comment By: Daniel Stenberg (bagder)
Message:
----------------------------------------------------------------------
You can respond by visiting:
These mail archives are generated by hypermail. |
Page updated November 12, 2010.
web site info