[FFmpeg-devel] [PATCH] IPv6 support v.2

Luca Abeni lucabe72
Thu Nov 8 22:54:26 CET 2007

Hi Nicolas,

On Thu, 2007-11-08 at 18:41 +0100, Nicolas George wrote:
> >      if (bind(udp_fd, res0->ai_addr, res0->ai_addrlen) < 0) {
> > 
> > Is this correct? Shouldn't the bind() be performed using "res" instead of
> > "res0"?
> I think you found another bug indeed.

Ok, thanks for confirming. Now I know that I did not misunderstand the
code ;-)
BTW, I think that the whole udp_ipv6_set_local() is quite broken: why
should "socket(res->ai_family, SOCK_DGRAM, 0)" fail? After all, "res"
has been returned by getaddrinfo()... So, is getaddrinfo() supposed to
return addresses belonging to unsupported families?
I understand why getaddrinfo() can return more than 1 address, but it
seems to me that the "for (res = res0; res; res=res->ai_next)" loop in
udp_ipv6_set_local() is useless...

I also agree with your comment about perror().

So, before removing the "old code", I'd really like to be sure that the
protocol-independent code is ok... And it seems to me that this code
still needs some work.


More information about the ffmpeg-devel mailing list