[Icecast-dev] listen to port on ipv6 by default[patch]
j at v2v.cc
j at v2v.cc
Mon Dec 13 06:59:25 PST 2004
On Mon, 2004-12-13 at 10:10 +1100, Michael Smith wrote:
> This doesn't look right to me. This makes the runtime behaviour depend on
> compile-time availability of AF_INET6.
right, HAVE_INET_PTON might be ok than, since AF_INET6 is used in the
#ifdef HAVE_INET_PTON section before.
> Also, I'm not sure if the runtime behaviour is correct - I'm not that familiar
> with IPv6. If you have a v6 socket open, will it accept v4 connections?
it will, applications listening on ::, listen on all interfaces ipv4 and ipv6.
> In short, a more complex patch would be needed - at the least, it'd need to
> query availability of ipv6 sockets at runtime (as well as having the
> compile-time checks for the appropriate functions/constants/etc.).
as AF_INET6 is needed with PTON i am not sure if that is true.
the open question is does
((struct sockaddr_in6*)&sa)->sin6_addr = in6addr_any;
((struct sockaddr_in6*)&sa)->sin6_family = AF_INET6;
((struct sockaddr_in6*)&sa)->sin6_port = htons(port);
work on ipv4 only if the kernel has no ipv6 support, i will try to find
out, but have not seen a kernel without ipv6 in a long time...
j
More information about the Icecast-dev
mailing list