Thursday, January 20, 2011

LUSCA ipv6 - almost there (again!)

I've managed to now get the Lusca IPv6 code to perform IPv6 lookups, open a socket to the remote host and then try an IPv6 connection.

But this doesn't work - the legacy Squid-2 comm code does this:
  • Create an AF_INET socket via comm_open();
  • Pass that socket to commConnectStart() with the relevant hostname or IPv4 address to connect to.
If the host is an IPv6 host, the IPv4 socket won't connect to it.

So now I'll have to change the comm API slightly to make commConnectStart() return a FD on completion, rather than taking a socket to connect to. This will also fix a long-standing hatred of mine - where Squid/Lusca opens up a socket that just sits there until DNS lookups succeed. Ew.

1 comment: