]> git.ipfire.org Git - thirdparty/squid.git/commit
Bug 5186: noteDestinationsEnd check failed: transportWait (#985)
authorAlex Rousskov <rousskov@measurement-factory.com>
Wed, 13 Apr 2022 03:22:18 +0000 (03:22 +0000)
committerAmos Jeffries <yadij@users.noreply.github.com>
Mon, 18 Jul 2022 07:46:45 +0000 (19:46 +1200)
commitc99962131fd6dab24be8d6d5eaef8131ae41c9b5
treede6008718089112f772610e12c418da8fd0ac4bf
parent8ac5bf96c7dc86595fe783d76b41a664ab987bf3
Bug 5186: noteDestinationsEnd check failed: transportWait (#985)

When the "no more destinations to try" notification comes after the last
forwarding/tunneling attempt has failed, the !destinationsFound block
does not run (because destinations were found), the usingDestination()
block does not run (because we are done with that last/failed
destination), but transportWait is false (for the same reason).

Also applied Bug 5090 (master/v6 commit 15bde30) FwdState protections to
tunnel.cc code. Tunnels may continue writing to the client while the
to-server connection is closing or closed, so TunnelStateData can be
potentially exposed to bug 5090 "no server connection but still
transporting" concerns. TunnelStateData never _retries_ successfully
established tunnels and, hence, can (and now does) stop receiving spare
destinations after committedToServer becomes true, but future tunnels
may start reforwarding in many cases, and most of the code does not need
to know about this (temporary?) simplification.

Also re-unified and polished related FwdState and TunnelStateData code,
including fixing lying source code comments and debug messages.
src/FwdState.cc
src/tunnel.cc