]> git.ipfire.org Git - thirdparty/squid.git/commit
Fixed comm.cc:644: "address.port() != 0" assertion (#1149)
authorAlex Rousskov <rousskov@measurement-factory.com>
Mon, 19 Sep 2022 14:07:47 +0000 (14:07 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Tue, 20 Sep 2022 16:40:48 +0000 (16:40 +0000)
commit408ea1cf67645575e494066c1770c93ebbb95ce8
treec32b6c4e5dd9edee7231d205ef75f44f36e4f341
parent6c025870c60f4446350919aa92529c669986c774
Fixed comm.cc:644: "address.port() != 0" assertion (#1149)

IPC code creating a TCP socket pair for communication with helpers used
comm_open() to create a _listening_ socket, misleading Comm into
applying IP_BIND_ADDRESS_NO_PORT optimization that delays port
assignment until connect(2) (which is never called for listening
sockets). Listening sockets must be opened using comm_open_listener(),
but the IPC use case was missed in 2009 commit 31be869 that introduced
comm_open_listener(). IP_BIND_ADDRESS_NO_PORT changes in recent commit
74d7d19 hit that bug.

Disclaimer: Windows-specific code adjusted without testing.
src/ipc.cc
src/ipc_win32.cc