Re: [Qemu-devel] [PATCH v2 3/3] Fix address handling in inet_nonblocking_connect

2012-09-13 Thread Orit Wasserman
On 09/13/2012 04:22 PM, Markus Armbruster wrote: > Orit Wasserman writes: > >> getaddrinfo can give us a list of addresses, but we only try to >> connect to the first one. If that fails we never proceed to >> the next one. This is common on desktop setups that often have ipv6 >> configured but n

Re: [Qemu-devel] [PATCH v2 3/3] Fix address handling in inet_nonblocking_connect

2012-09-13 Thread Orit Wasserman
On 13 בספט 2012, at 16:30, "Michael S. Tsirkin" wrote: > On Thu, Sep 13, 2012 at 03:22:24PM +0200, Markus Armbruster wrote: >>> +/* Struct to store connect state for non blocking connect */ >>> +typedef struct ConnectState { >>> +int fd; >>> +struct addrinfo *addr_list; >>> +struc

Re: [Qemu-devel] [PATCH v2 3/3] Fix address handling in inet_nonblocking_connect

2012-09-13 Thread Michael S. Tsirkin
On Thu, Sep 13, 2012 at 03:22:24PM +0200, Markus Armbruster wrote: > > +/* Struct to store connect state for non blocking connect */ > > +typedef struct ConnectState { > > +int fd; > > +struct addrinfo *addr_list; > > +struct addrinfo *current_addr; > > +ConnectHandler *callback; >

Re: [Qemu-devel] [PATCH v2 3/3] Fix address handling in inet_nonblocking_connect

2012-09-13 Thread Markus Armbruster
Orit Wasserman writes: > getaddrinfo can give us a list of addresses, but we only try to > connect to the first one. If that fails we never proceed to > the next one. This is common on desktop setups that often have ipv6 > configured but not actually working. > > To fix this make inet_connect_no

[Qemu-devel] [PATCH v2 3/3] Fix address handling in inet_nonblocking_connect

2012-09-12 Thread Orit Wasserman
getaddrinfo can give us a list of addresses, but we only try to connect to the first one. If that fails we never proceed to the next one. This is common on desktop setups that often have ipv6 configured but not actually working. To fix this make inet_connect_nonblocking retry connection with a di