Timshel Knoll timshel@debian.org writes:
I've noticed in my Debian packaging exploits of lsh that IPv6 support is built only if the build-time kernel has IPv6 available. Really it should be OK to build with IPv6 support assuming all the appropriate headers and libraries are available at build time, since the IPv6 code simply fails and fall back to the IPv4 code, doesn't it?
Sorry for the late reply. I think this is a known bug, the underlying problem is that lshd wants to listen on only a single address. When doing ipv6, it creates an ipv6 socket on the wildcard interface, and relies on the tcp stack to give it ipv4 connections as mapped addresses (is that the correct terminology?). And that fails miserably if ipv6 isn't available at runtime.
One could add some fallback, but the Right Way to do it is to support listening on several addresses and sockets in parallell, e.g. all addresses returned by getaddrinfo. The recent changes to the i/o code (part of the X11 forwarding hacking) is a step in the right direction.
The reason I ask this is that I would like to "force enable" building of IPv6 support in the Debian packages, since they end up running on boxes that they are not built on, and my guess is that not all the Debian build machines have IPv6 support (I'm not entirely sure on this,however).
If I recall correctly since last time this issue was up, an lshd built with ipv6 support will fail to run on machines without ipv6 support at runtime. The configure test for real ipv6 support is a workaround for that problem.
Regards, /Niels