]> git.ipfire.org Git - thirdparty/squid.git/commit
Clean up use of commResetFD when socket incompatible with requested address
authorHenrik Nordstrom <henrik@henriknordstrom.net>
Fri, 14 May 2010 04:04:53 +0000 (06:04 +0200)
committerHenrik Nordstrom <henrik@henriknordstrom.net>
Fri, 14 May 2010 04:04:53 +0000 (06:04 +0200)
commit3d98ff81c9bba1b6aafddd0b90148acb9331a973
tree7d0acd7595ef1ff9f0f6ab68aba54dc263a744c5
parent34e3ac93009e5474f10c36506e0411f317c2d10a
Clean up use of commResetFD when socket incompatible with requested address

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 for now.

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.
src/comm.cc