Subject: Re: [PATCH] Fix UDP and TCP port byte order in saved options.

Re: [PATCH] Fix UDP and TCP port byte order in saved options.

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 21 May 2012 22:43:23 +0200 (CEST)

On Mon, 21 May 2012, Nick Alcock wrote:

> The UDP and TCP port are stored in network byte order in the
> ares_channeldata, but are passed in to ares_init_options() in host byte
> order. Thus we must return them from ares_save_options() in host byte order
> too, or a duplicated channel will convert them again, leading to a
> nonfunctional channel and a mysterious connection refused error from
> ares_gethostbyname(). This breaks ares_dup(), thus the curl easy API when
> c-ares is used by curl, and thus all the curl easy API's users.

Thanks! Patch merged and pushed as commit 9bd38a4a6e3cc.

I introduced the problem in commit 506d58627, only present in one release:
1.8.0.

-- 
  / daniel.haxx.se
Received on 2012-05-21