cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] Fix for tftp

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 23 Mar 2006 23:49:07 +0100 (CET)

On Thu, 23 Mar 2006, Tor Arntsen wrote:

> The following patch fixes the bind() problem on Unix (tested on IRIX, AIX
> and Tru64) so that tftp works.

> - sizeof(state->local_addr));
> + sizeof(struct sockaddr_in));

Thanks a lot for your work and fix!

I'm curious on why this is needed. Isn't sizeof(state->local_addr) in fact a
good deal larger than sizeof(struct sockaddr_in) on these systems? The
local_addr is a Curl_sockaddr_storage struct, which is declared by magic in
lib/sockaddr.h.

The downside with this suggested patch is that it breaks TFTP over IPv6, and
hence I'd like to lift a few more stones to see if we can get the bugs to
crawl away using another method.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-03-23