Henrik Nordström wrote:
Take two.

The change is that this version also tries to skip IPv4 addresses if the
socket is IPv6-only. This case should have been handled by existing code
paths, but the way that was done was quite twisted and apparently broke
down by my changes to commResetFD.


This patch backs out part of the patch for Bug #2222 and replaces it by
crudely cycling over the available addresses, trying to skip over
addresses not compatible with the current socket.

This solves issues seen when using tproxy or tcp_outgoing_address and
DNS of the requested host returns AAAA records in addition to A records.

This change is interim, waiting for the larger connection setup
overhaul. But seems to do the trick at least for me in tproxy & ipv4
setups. Unfortunately I do not have an IPv6 connection at the moment to
test IPv6 on, but I don't see how it could break IPv6.

One effect of this change is that there will be no fallback to the other
IP generation if the socket is configured to a specific outgoing
address. Priory the code threw away the outgoing address and tried
again when encountering an incompatibility.

Regards
Henrik


Sweet. This one works.
"99 unable to assign address" when connecting to v6-only sites via tcp_outgoing_address without a v6 link, or with the wrong IPv6 bound to.
  All other connections failover to the relevant protocol.

It does not mark IPv6 'BAD' in the case where the link is down or boudn wrong. This is fine since the failover works, but we may want to look into it later.

Amos
--
Please be using
  Current Stable Squid 2.7.STABLE9 or 3.1.3

Reply via email to