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

Nicolas George nicolas.george
Thu Nov 8 23:16:25 CET 2007

L'octidi 18 brumaire, an CCXVI, Luca Abeni a ?crit?:
> 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 think it can. For example, imagine a GNU/Linux system: the glibc knows of
IPv6, but the Linux kernel can be built with IPv6 disabled (or as a module,
not loaded). In that case, getaddrinfo could reasonably return the IPv6
address although the kernel will not be able to use it: creating a socket is
not the only reason to resolve a name.

And even if the goal is to create a socket, the return code is relevant: for
example, if I type "ssh she-seel" (she-seel is my laptop, it has an usual
IPv6 global unicast address, but no public IPv4 address), and it fails, a
different error message will help me to solve the problem:

Host not found -> I made a mistake typing the host name, or the DNS is broken
Address family not supported -> the kernel lacks IPv6 support
No route to host -> the host lacks IPv6 connectivity


  Nicolas George

More information about the ffmpeg-devel mailing list