Mailing List Archive

conserver's IPv6 support not fully baked...

I recently had to deal with a conserver version upgrade, and
someone had decided to turn on the "IPv6" option in the package.

Attached below are two patches which do three things:

1) (unrelated to IPv6) print decoded errno on connection failure
2) use temp variables to walk address lists, avoid
trying to do freeaddrinfo(NULL), as that leads to SEGV for the
main server process
3) use correct socket address length when calling getnameinfo()
in the IPv6 case, avoid early return with "permanent failure"
because the socket address length is wrong

In my case I'm running this on NetBSD, and on that platform you
need to open two server sockets, one for IPv6 and one for IPv4 if
you are going to serve both. The code as it stands on NetBSD
only opens an IPv6 socket if the IPv6 option is enabled, and
hence IPv4 is not served, causing backward compatibility problems
and failure to interoperate with conserver installations which
don't have IPv6 configured.

Plus ... it seems that it also can't connect to remote consoles
which are only reachable via IPv4 when the IPv6 option is
enabled, but admittedly I did not debug that more thoroughly.

It seems to be a bigger task to fix the Master() function in
conserver/master.c to do the "two server sockets" dance needed on
NetBSD. Plus one needs to portably distinguish where two sockets
are needed and where they are not, so I've punted on that for


- H?vard